Part Number Hot Search : 
LRS1383C 1D44D PJS6815 BA9741F 07005 LTC2271 2SA1209T BU2525A
Product Description
Full Text Search
 

To Download LAN9303MI-AKZE Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  smsc lan9303/lan9303i datasheet revision 1.5 (07-08-11) datasheet product features lan9303/lan9303i small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii highlights ? up to 200mbps via turbo mii interface ? high performance, full featured 3 port switch with vlan, qos packet prioritization, rate limiting, igmp monitoring and management functions ? serial management via i 2 c or smi ? unique virtual phy feature simplifies software development by mimicking t he multiple switch ports as a single port phy target applications ? cable, satellite, and ip set-top boxes ? digital televisions ? digital video recorders ? voip/video phone systems ? home gateways ? test/measurement equipment ? industrial au tomation systems key benefits ? ethernet switch fabric 32k buffer ram 512 entry forwarding table port based ieee 802.1q vlan support (16 groups) C programmable ieee 802.1q tag insertion/removal ieee 802.1d spanning tree protocol support 4 separate transmit queues available per port fixed or weighted egress priority servicing qos/cos packet prioritization C input priority determined by vlan tag, da lookup, tos, diffserv or port default value C programmable traffic class map based on input priority on per port basis C remapping of 802.1q priority field on per port basis C programmable rate limiting at the ingress with coloring and random early discard, per port / priority C programmable rate limiting at the egress with leaky bucket algorithm, per port / priority igmp v1/v2/v3 monitoring for multicast packet filtering programmable broadcast st orm protection with global % control and enable per port programmable buffer usage limits dynamic queues on internal memory programmable filter by mac address ? switch management port mirroring/monitoring/sn iffing: ingress and/or egress traffic on any port or port pair fully compliant statistics (mib) gathering counters control registers configurable on-the-fly ? ports port 0 - mii mac, mii phy, rmii phy modes 2 internal 10/100 phys with hp auto-mdix support 200mbps turbo mii (phy or mac mode) fully compliant with ieee 802.3 standards 10base-t and 100base-tx support full and half duplex support full duplex flow control backpressure (forced collisi on) half duplex flow control automatic flow control based on programmable levels automatic 32-bit crc generation and checking 2k jumbo packet support programmable interframe gap, flow control pause value full transmit/receive statistics full led support per port auto-negotiation automatic polarity correction automatic mdi/mdi-x loop-back mode ? serial management i 2 c (slave) access to all internal registers miim (mdio) access to phy related registers smi (extended miim) access to all internal registers ? other features general purpose timer i 2 c serial eeprom interface programmable gpios/leds ? single 3.3v power supply ? esd protection levels 8kv hbm without external protection devices 8kv contact mode (iec61000-4-2) 15kv air-gap discharge mode (iec61000-4-2) ? latch-up exceeds 150ma per eia/jesd 78 ? 56-pin qfn (8x8 mm) lead-free rohs compliant package ? available in commercial & industrial temp. ranges downloaded from: http:///
order number(s): lan9303-abzj for 56-pin, qfn lead-free rohs compliant package (0 to 70 c temp range) lan9303i-abzj for 56-pin, qfn lead-fre e rohs compliant package (-40 to 85 c temp range) this product meets the halogen maximum concentration values per iec61249-2-21 for rohs compliance and environmen tal information, please visit www.smsc.com/rohs small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 2 smsc lan9303/lan9303i datasheet 80 arkay drive, hauppauge, ny 11788 (631) 435-6000 or 1 (800) 443-semi copyright ? 2011 smsc or its subsidiaries. all rights reserved. circuit diagrams and other information relating to smsc produc ts are included as a means of illustrating typical applications. consequently, complete information sufficient for construction purposes is not necessarily given. although the information has been checked and is believed to b e accurate, no re sponsibility is assumed for inaccuracies. smsc reserves the right to make changes to specifications and produc t descriptions at any time without notice. contact your local sm sc sales office to obtain the latest specifications before placing your product order. the provision of this inform ation does not convey to the purchaser of the described semicond uctor devices any licenses under any patent rights or other intellectual property rights of smsc or others. all sales are expr essly conditional on your agreement to the te rms and conditions of the most recently dated version of smsc's standard terms of sale agreement dated before the date of your order (the "terms of sale agreement"). the pro duct may contain design defects or errors known as anomalies which may cause the product's functions to deviate from published specifications . anomaly sheets are availab le upon request. smsc products are not designed, intended, authorized or warranted for use in any life support or other applicati on where product failure could cause or contribute to personal injury or severe property damage. any and all such uses without prior written approval of an officer of smsc and furthe r testing and/or modification will be fully at the risk of the customer. copies of this document or other smsc literature, as well as the terms of sale agreement, may be obtai ned by visiting smscs website at h ttp://www.smsc.com. smsc is a registered trademark of standard microsystems corporation (smsc). product names and company names are the trademarks of their respective holders. smsc disclaims and excludes any and all warrant ies, including without limi tation any and all implied warranties of merchantabil ity, fitness for a particular purpose, title, a nd against infringement and the like, and any and all warranties arising from any cou rse of dealing or usage of trade. in no event shall smsc be liable for any direct, incidental, indi rect, special, punitive, or cons equential damages; or for lost data, profits, savings or revenues of any kind; regardless of the form of action, whether based on contrac t; tort; negligence of smsc or others; strict liability; breach of wa rranty; or otherwise; whether or not any remedy of buyer is h eld to have failed of its essential purpose, and whether or not smsc has been advised of the possibility of such damages. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 3 revision 1.5 (07-08-11) datasheet table of contents chapter 1 preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.1 general terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 chapter 2 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.1 general description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.2 block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.2.1 system clocks/reset/pme controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.2.2 system interrupt controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.2.3 switch fabric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.2.4 ethernet phys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.2.5 phy management interface (pmi) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.2.6 i2c slave controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.2.7 smi slave controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.2.8 eeprom controller/loader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.2.9 gpio/led controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.3 modes of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.3.1 internal phy mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.3.2 mac mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.3.3 phy mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.3.4 management modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 chapter 3 pin description and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.1 pin diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.1.1 56-qfn pin diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.2 pin descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.3 buffer types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 chapter 4 clocking, resets, and power management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 4.1 clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 4.2 resets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 4.2.1 chip-level resets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 4.2.1.1 power-on reset (por) ...................................................................... .............................. .............................................................................. 43 4.2.1.2 nrst pin reset ............................................................................................ .............. .................................................................................... 43 4.2.2 multi-module resets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4.2.2.1 digital reset (digital_rst) .......................................................................... ................... ............................................................................ 44 4.2.3 single-module resets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4.2.3.1 port 2 phy reset........................................................................................ ................ .................................................................................... 44 4.2.3.2 port 1 phy reset........................................................................................ ................ .................................................................................... 45 4.2.3.3 virtual phy reset ......................................................................................... .............. .................................................................................... 45 4.2.4 configuration straps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 4.2.4.1 soft-straps .................................................................................................. .................................................................................................... 46 4.2.4.2 hard-straps............................................................................................ ......................................................................................................... 52 4.3 power management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 4.3.1 port 1 & 2 phy power management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 chapter 5 system interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 5.1 functional overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 5.2 interrupt sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 5.2.1 switch fabric interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 5.2.2 ethernet phy interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 5.2.3 gpio interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 5.2.4 general purpose timer interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 4 smsc lan9303/lan9303i datasheet 5.2.5 software interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 5.2.6 device ready interrupt. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 chapter 6 switch fabric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 6.1 functional overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 6.2 switch fabric csrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 6.2.1 switch fabric csr writes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 6.2.2 switch fabric csr reads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 6.2.3 flow control en able logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 6.3 10/100 ethernet macs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 6.3.1 receive mac . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 6.3.1.1 receive counters ......................................................................................... .................................................................................................. 66 6.3.2 transmit mac. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 6.3.2.1 transmit counters ........................................................................................... ............ ................................................................................... 67 6.4 switch engine (swe) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 6.4.1 mac address lookup table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 6.4.1.1 learning/aging/migration ........................................ ................................................... ..... ................................................................................ 69 6.4.1.2 static entries................................................................................................. .................................................................................................. 69 6.4.1.3 multicast pruning ........................................................................................ ............... ..................................................................................... 69 6.4.1.4 address filtering ...................................................................................... ................. ...................................................................................... 69 6.4.1.5 spanning tree port state override........................................................ ............................... .......................................................................... 69 6.4.1.6 mac destination address lookup priority....................................................... .......................... ..................................................................... 69 6.4.1.7 host access ................................................................................................ ............. ....................................................................................... 69 6.4.2 forwarding rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 6.4.3 transmit priority queue selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 6.4.3.1 port default priority.......................................................................... ......................... ...................................................................................... 74 6.4.3.2 ip precedence based priority ..................................... ................................................... .... ............................................................................. 74 6.4.3.3 diffserv based priority..................................................................................... ............ .............................................................................. 74 6.4.3.4 vlan priority ......................................................................................... .................. ....................................................................................... 74 6.4.4 vlan support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 6.4.5 spanning tree support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 6.4.6 ingress flow metering and coloring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 6.4.6.1 ingress flow calculation............................................................................... ................. ................................................................................. 78 6.4.7 broadcast storm control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 6.4.8 ipv4 igmp support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 6.4.9 port mirroring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 6.4.10 host cpu port special tagging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 6.4.10.1 packets from the host cpu ............................................................................. ................. .............................................................................. 81 6.4.10.2 packets to the host cpu ...................................................................................... .......... ................................................................................ 82 6.4.11 counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 6.5 buffer manager (bm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 6.5.1 packet buffer alloca tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 6.5.1.1 buffer limits and flow control levels ............................................. ...................................... ......................................................................... 83 6.5.2 random early discard (red). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 6.5.3 transmit queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 6.5.4 transmit priority queue servicing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 6.5.5 egress rate limiting (leaky bucket) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 6.5.6 adding, removing, and changing vlan tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 6.5.7 counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 6.6 switch fabric interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 chapter 7 ethernet phys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 7.1 functional overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 7.1.1 phy addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 7.2 port 1 & 2 phys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 7.2.1 100base-tx transmit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 7.2.1.1 mii mac interface .................................................................................. ..................... .................................................................................... 92 7.2.1.2 4b/5b encoder.............................................................................................. .................................................................................................. 92 7.2.1.3 scrambler and piso ........................................... ................................................... ........ ................................................................................. 94 7.2.1.4 nrzi and mlt-3 encoding ........................................ ................................................... ...... ............................................................................ 94 7.2.1.5 100m transmit driver ............................................. ................................................... .... ................................................................................. 94 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 5 revision 1.5 (07-08-11) datasheet 7.2.1.6 100m phase lock loop (pll) .......................................... ................................................... . .......................................................................... 94 7.2.2 100base-tx receive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 7.2.2.1 a/d converter .......................................................................................... ................. ...................................................................................... 95 7.2.2.2 dsp: equalizer, blw correction and clock/data recovery .............................. .................................... ........................................................ 95 7.2.2.3 nrzi and mlt-3 decoding ......................................... ................................................... ..... ............................................................................ 96 7.2.2.4 descrambler and sipo ............................................................................ ........................ ............................................................................... 96 7.2.2.5 5b/4b decoding .................................................................................. ........................ .................................................................................... 96 7.2.2.6 receiver errors ........................................................................................... .................................................................................................... 96 7.2.2.7 mii mac interface .................................................................................. ..................... .................................................................................... 96 7.2.3 10base-t transmit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 7.2.3.1 mii mac interface .................................................................................. ..................... .................................................................................... 97 7.2.3.2 10m tx driver and pll .............................................. ................................................... .. ............................................................................... 97 7.2.4 10base-t receive. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 7.2.4.1 filter and squelch ......................................................................................... ............. ..................................................................................... 97 7.2.4.2 10m rx and pll................................................ ................................................... ....... ................................................................................... 97 7.2.4.3 mii mac interface .................................................................................. ..................... .................................................................................... 98 7.2.4.4 jabber detection......................................... ................................................... ............ ..................................................................................... 98 7.2.5 phy auto-negotiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 7.2.5.1 phy pause flow control ............................................................................ ...................... ............................................................................ 100 7.2.5.2 parallel detection............................................................................................. ......... .................................................................................... 100 7.2.5.3 restarting auto-negotiation................................................................... .......................... ............................................................................. 100 7.2.5.4 disabling auto-negotiation ......................................................................... ..................... ............................................................................. 100 7.2.5.5 half vs. full-duplex ......................................................................................... ........... .................................................................................. 101 7.2.6 hp auto-mdix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 7.2.7 mii mac interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 7.2.8 phy management control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 7.2.8.1 phy interrupts .................................................................................... ...................... .................................................................................... 102 7.2.9 phy power-down modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 7.2.9.1 phy general power-down ...................................................................... ............................ ......................................................................... 103 7.2.9.2 phy energy detect power-down ....................................................................... ..................... ..................................................................... 103 7.2.10 phy resets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 7.2.10.1 phy software reset via reset_ctl..................................................................... .................. ................................................................... 103 7.2.10.2 phy software reset via phy_basic_ctrl_x .............................................. .................................. ........................................................... 104 7.2.10.3 phy power-down reset.................................................................................. ................. ............................................................................ 104 7.2.11 leds. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 7.2.12 required ethernet magnetics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 7.3 virtual phy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 7.3.1 virtual phy auto-negotiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 7.3.1.1 parallel detection............................................................................................. ......... .................................................................................... 106 7.3.1.2 disabling auto-negotiation ......................................................................... ..................... ............................................................................. 106 7.3.1.3 virtual phy pause flow control ................................................................. ......................... ......................................................................... 106 7.3.2 virtual phy in mac mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 7.3.2.1 full-duplex flow control............................................................................. ................... ............................................................................... 107 7.3.3 virtual phy resets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 7.3.3.1 virtual phy software reset via reset_ctl ................................................. ............................... .............................................................. 107 7.3.3.2 virtual phy software reset via vphy_basic_ctrl ............................... ........................................... ....................................................... 107 chapter 8 serial management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 8.1 functional overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 8.2 i2c overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 8.3 i2c master eeprom controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 8.3.1 i2c eeprom device addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 8.3.2 i2c eeprom byte read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 8.3.3 i2c eeprom sequential byte reads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 11 8.3.4 i2c eeprom byte writes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 8.3.5 wait state generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 8.3.6 i 2 c bus arbitration and clock synchronizatio n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 8.3.6.1 bus busy.......................................................................................................... ............................................................................................. 112 8.3.6.2 clock synchronization ............................................................................. ...................... ............................................................................... 112 8.3.6.3 arbitration............................................................................................ .......................................................................................................... 113 8.3.6.4 timeout due to busy or arbitration.................................... .................................................. ......................................................................... 113 8.3.7 i2c master eeprom controlle r operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 8.4 eeprom loader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 8.4.1 eeprom loader operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 8.4.2 eeprom valid flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 6 smsc lan9303/lan9303i datasheet 8.4.3 mac address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 8.4.4 soft-straps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 8.4.4.1 phy registers synchronization.................................................................... ....................... ......................................................................... 117 8.4.4.2 virtual phy registers synchronization.................................................. ................................. ...................................................................... 118 8.4.4.3 led and manual flow control register synchronization .................................... ................................ ......................................................... 118 8.4.5 register data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 8.4.6 eeprom loader finished wait -state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 19 8.4.7 reset sequence and eeprom loader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 8.5 i2c slave operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 8.5.1 i2c slave command format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 8.5.2 i2c slave read sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 8.5.2.1 i2c slave read polling for reset complete ................................................. .............................. .................................................................. 121 8.5.3 i2c slave write sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 chapter 9 mii data interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 9.1 port 0 mii data path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 9.1.1 port 0 mii mac mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 9.1.2 port 0 mii phy mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 9.1.2.1 turbo operation............................................................................... .......................... ................................................................................... 123 9.1.2.2 clock drive strength ..................................................................................... ............... ................................................................................. 123 9.1.2.3 signal quality error (sqe) heartbeat test .................................... ........................................... .................................................................... 123 9.1.2.4 collision test ....... ........... .......... ........... .......... ........... .......... ........... .......... ........ ....... ...................................................................................... 124 9.1.2.5 loopback ............................................. ................................................... ................ ...................................................................................... 124 9.1.3 port 0 rmii phy mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 9.1.3.1 reference clock selection............................................................................... ................ ............................................................................. 124 9.1.3.2 clock drive strength ..................................................................................... ............... ................................................................................. 125 9.1.3.3 signal quality error (sqe) heartbeat test .................................... ........................................... .................................................................... 125 9.1.3.4 collision test ....... ........... .......... ........... .......... ........... .......... ........... .......... ........ ....... ...................................................................................... 125 9.1.3.5 loopback mode .............................................. ................................................... .......... ................................................................................. 125 chapter 10 mii management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 10.1 functional overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 10.2 smi slave controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 10.2.1 read sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 10.2.1.1 smi read polling for reset co mplete ...... ........... .......... ........... .................... ........... ........ ....... ...................................................................... 128 10.2.2 write sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 10.3 phy management interface (pmi) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 10.3.1 eeprom loader phy register access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 10.4 mii mode multiplexer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 10.4.1 port 0 mac mode smi managed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 10.4.2 port 0 mac mode i2c managed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 10.4.3 port 0 phy mode smi managed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 10.4.4 port 0 phy mode i2c managed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 chapter 11 general purpose timer & free-running clock. . . . . . . . . . . . . . . . . . . . . . . . 134 11.1 general purpose timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 11.2 free-running clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 chapter 12 gpio/led controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 12.1 functional overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 12.2 gpio operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 12.2.1 gpio interr upts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 12.2.1.1 gpio interrupt polarity........................................................................ ........................ .................................................................................. 136 12.3 led operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 12.3.1 led function definitions when led_ fun[1:0] = 00b, 01b, or 10b . . . . . . . . . . . . . . . . . . . . . . 137 12.3.2 led function definitions when led_fun[1:0] = 11b . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 chapter 13 register descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 7 revision 1.5 (07-08-11) datasheet 13.1 register nomenclature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 13.2 system control and status registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 13.2.1 interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 13.2.1.1 interrupt configuration register (irq_cfg) ......................................... .................................... ................................................................... 143 13.2.1.2 interrupt status register (int_sts)........................................................... .................................................................................................. 145 13.2.1.3 interrupt enable register (int_en).................................................... ................................. ......................................................................... 146 13.2.2 gpio/led. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 13.2.2.1 general purpose i/o configuration register (gpio_cfg) ..................... ............................................. ........................................................ 147 13.2.2.2 general purpose i/o data & direction register (gpio_data_dir) ........... ............................................... ................................................. 148 13.2.2.3 general purpose i/o interrupt status and enable register (gpio_ int_sts_en)............................................. ......................................... 149 13.2.2.4 led configuration register (led_cfg) .................................................... ............................... ................................................................... 150 13.2.3 eeprom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 13.2.3.1 eeprom command register (e2p_cmd) ........................................ .............................................. ............................................................ 151 13.2.3.2 eeprom data register (e2p_data)................................................... ..................................... .................................................................. 154 13.2.4 switch fabric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 13.2.4.1 port 1 manual flow control register (manual_fc_1)............................... ....................................... ......................................................... 155 13.2.4.2 port 2 manual flow control register (manual_fc_2)............................... ....................................... ......................................................... 157 13.2.4.3 port 0 manual flow control register (manual_fc_0)............................... ....................................... ......................................................... 159 13.2.4.4 switch fabric csr interface data register (switch_csr_data) ...................... ...................................... ............................................... 161 13.2.4.5 switch fabric csr interface command register (switch_csr_cmd) ............................... ........................... ......................................... 162 13.2.4.6 switch fabric mac address high register (switch_ mac_addrh) ...... .......... ........... .......... ........................ ........................................... 164 13.2.4.7 switch fabric mac address low register (switch_ mac_addrl) ....... .......... ........... .......... ........................ ........................................... 165 13.2.4.8 switch fabric csr interface direct data registers (switch_csr_direct_data) .......... ................................... .................................. 167 13.2.5 phy management interface (pmi) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 13.2.5.1 phy management interface data register (pmi_data) ........................................ .............................. ....................................................... 170 13.2.5.2 phy management interface access register (pmi_access) ................................. ................................. .................................................. 171 13.2.6 virtual phy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 13.2.6.1 virtual phy basic control register (vphy_basic_ctrl) ............................... .................................... ...................................................... 173 13.2.6.2 virtual phy basic status register (vphy_basic_status)............ ...................................................... .................................................... 175 13.2.6.3 virtual phy identification msb register (vphy_id_msb) .......................... ........................................ ........................................................ 177 13.2.6.4 virtual phy identification lsb register (vphy_id_lsb) .................. ................................................ .......................................................... 178 13.2.6.5 virtual phy auto-negotiation advertisement register (vphy_an_a dv)...................................................... .............................................. 179 13.2.6.6 virtual phy auto-negotiation link partner base page ab ility register (vphy_an_lp_base_ability) ......................... ......................... 181 13.2.6.7 virtual phy auto-negotiation expansion register (vphy_an_exp) .......... ................................................ ................................................ 184 13.2.6.8 virtual phy special control/status register (vphy_special_co ntrol_status) .............................................. ................................ 185 13.2.7 miscellaneous. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 13.2.7.1 chip id and revision (id_rev).......................................................................... ................ .......................................................................... 187 13.2.7.2 byte order test register (byte_test) .................................................... ............................... ................................................................... 188 13.2.7.3 hardware configuration register (hw_cfg)............................................................... ................ ................................................................ 189 13.2.7.4 general purpose timer configuration register (gpt _cfg) ....................................................................................................................... 190 13.2.7.5 general purpose timer count register (gpt_cnt) ................................... ...................................... .......................................................... 191 13.2.7.6 free running 25mhz counter register (free_run)......................................... ................................ ........................................................ 192 13.2.7.7 reset control register (reset_ctl) .................................................... ................................. .................................................................... 193 13.3 ethernet phy control and status registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 13.3.1 virtual phy registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 13.3.2 port 1 & 2 phy registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 13.3.2.1 port x phy basic control register (phy_basic_control_x) ........... ..................................................... ................................................ 196 13.3.2.2 port x phy basic status register (phy_basic_status_x) ........ .......................................................... ................................................... 198 13.3.2.3 port x phy identification msb register (phy_id_msb_x)............. ..................................................... ........................................................ 200 13.3.2.4 port x phy identification lsb register (phy_id_lsb_x).......................... ........................................ .......................................................... 201 13.3.2.5 port x phy auto-negotiation advertisement register (phy_an_adv_x) ......................... ............................. ............................................. 202 13.3.2.6 port x phy auto-negotiation link partner base page ability register (phy_an_lp_base_ability_x) .................... ..... ........................ 205 13.3.2.7 port x phy auto-negotiation expansion register (phy_an_exp_x) .......................... ................................ ............................................... 207 13.3.2.8 port x phy mode control/status register (phy_mode_control_stat us_x).................................................... ................................. 208 13.3.2.9 port x phy special modes register (phy_special_modes_x) ............ .................................................... .............................................. 209 13.3.2.10 port x phy special control/status indication register (phy_spe cial_control_stat_ind_x) ................................ .......................... 210 13.3.2.11 port x phy interrupt source flags register (phy _interrupt_source_x)... ........... .......... ........... ................ ........................................ 212 13.3.2.12 port x phy interrupt mask regi ster (phy_interrupt_mask_x ) .......... .......... ........... .......... ........... ......... ............................................... 213 13.3.2.13 port x phy special control/status register (phy_special_control_ status_x)............................................. ................................. 214 13.4 switch fabric control and status registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 13.4.1 general switch csrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 13.4.1.1 switch device id register (sw_dev_id) .................................................... .............................. .................................................................. 226 13.4.1.2 switch reset register (sw_reset) ........................................................... ............................ .................................................................... 227 13.4.1.3 switch global interrupt mask register (sw_imr)............................. ............................................ ............................................................... 228 13.4.1.4 switch global interrupt pending register (sw_ipr).......................... ............................................ .............................................................. 229 13.4.2 switch port 0, port 1, and port 2 csrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 13.4.2.1 port x mac version id register (mac_ver_id_x) ........................................ .................................. ........................................................... 230 13.4.2.2 port x mac receive configuration register (mac_rx_cfg_x) ................. .............................................. .................................................. 231 13.4.2.3 port x mac receive undersize count register (mac_rx_undsze_cnt_x) .................................... .................. ..................................... 232 13.4.2.4 port x mac receive 64 byte count register (mac_rx_64_cnt_x).................. .......................................... .............................................. 233 13.4.2.5 port x mac receive 65 to 127 byte count register (mac_rx_65_to_1 27_cnt_x).............................................. .................................. 234 13.4.2.6 port x mac receive 128 to 255 byte count register (mac_rx_128_to_255_cnt_x)............................ ................ ................................ 235 13.4.2.7 port x mac receive 256 to 511 byte count register (mac_rx_256_to_511_cnt_x)............................ ................ ................................ 236 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 8 smsc lan9303/lan9303i datasheet 13.4.2.8 port x mac receive 512 to 1023 byte count register (mac_rx_512_to_1023_cnt_x).......................................... .............................. 237 13.4.2.9 port x mac receive 1024 to max byte count register (mac_rx_1024_to_max_cnt_x) ................................ .......... ........................... 238 13.4.2.10 port x mac receive oversize count register (mac_rx_ovrsze_cnt_x) ................................... ................... ....................................... 239 13.4.2.11 port x mac receive ok count register (mac_rx_pktok_cnt_x)....................... ...................................... ............................................ 240 13.4.2.12 port x mac receive crc error count register (mac_rx_crcerr_cnt_x).................................. ................... ..................................... 241 13.4.2.13 port x mac receive multicast count register (mac_ rx_mulcst_cnt_x) ................................................ ..... ........................................ 242 13.4.2.14 port x mac receive broadcast count register (ma c_rx_brdcst_cnt_x) ...... .......... ........... .......... ................ ...................................... 243 13.4.2.15 port x mac receive pause frame count register (mac_rx_pause_cnt_x) ... ................................................. .................................... 244 13.4.2.16 port x mac receive fragment error count register (mac_rx_frag_cnt_x)................................ .................. ...................................... 245 13.4.2.17 port x mac receive jabber error count register (ma c_rx_jabb_cnt_x) .............................................. ...... ......................................... 246 13.4.2.18 port x mac receive alignment error count register (mac_rx_align_cnt_x) .... ............................................ ...................................... 247 13.4.2.19 port x mac receive packet length count register (mac_rx_pktlen_cnt_x) ........................... ...................... .................................... 248 13.4.2.20 port x mac receive good packet length count register (mac_rx_goodpk tlen_cnt_x) ........................................ ........................ 249 13.4.2.21 port x mac receive symbol error count register (mac_rx_symbol_cnt_x) ............................................... ... .................................... 250 13.4.2.22 port x mac receive control frame count register (mac_rx_ctlfrm_cnt_x) .... ............................................. ................................... 251 13.4.2.23 port x mac transmit configuration register (mac_tx_cfg_x) ........... .................................................. ................................................... 252 13.4.2.24 port x mac transmit flow control settings register (mac_tx_fc_settings_x ) ............................................. ..................................... 253 13.4.2.25 port x mac transmit deferred count register (mac_tx_defer_cnt_x) .. .................................................... ......................................... 254 13.4.2.26 port x mac transmit pause count register (mac_tx_ pause_cnt_x) ................................................ ......... .......................................... 255 13.4.2.27 port x mac transmit ok count register (mac_tx_pktok_cnt_x) ................................... ......................... ............................................ 256 13.4.2.28 port x mac transmit 64 byte count register (mac_tx_64_cnt_x) ............................... ........................... ............................................... 257 13.4.2.29 port x mac transmit 65 to 127 byte count register (mac_tx_65_to_127_cnt_x) ........................... ................. ................................... 258 13.4.2.30 port x mac transmit 128 to 255 byte count regist er (mac_tx_128_to_255_cnt_x) .......................................... ................................. 259 13.4.2.31 port x mac transmit 256 to 511 byte count regist er (mac_tx_256_to_511_cnt_x) .......................................... ................................. 260 13.4.2.32 port x mac transmit 512 to 1023 byte count register (mac_tx_512_to_1023_cnt_x) ........................ ................ ............................... 261 13.4.2.33 port x mac transmit 1024 to max byte count register (mac_tx_1024_to_max_cnt_x)........................................ ............................. 262 13.4.2.34 port x mac transmit undersize count register (mac_tx_undsze_cnt_x) ............................... ..................... ...................................... 263 13.4.2.35 port x mac transmit packet length count register (mac_tx_pktle n_cnt_x) ................................................ .................................... 264 13.4.2.36 port x mac transmit broadcast count register (mac_tx_brdcst_cnt_x) ........................... ......................... ...................................... 265 13.4.2.37 port x mac transmit multicast count register (mac_tx_mulcst_cnt_x) .................................................... ........................................ 266 13.4.2.38 port x mac transmit late collision count register (mac_tx_latecol_cnt_x) . .......... ........... .......... ........ ...... ..................................... 267 13.4.2.39 port x mac transmit excessive collision count regist er (mac_tx_exccol_cnt_x)....... .......... ........... ........ ...... .................................. 268 13.4.2.40 port x mac transmit single collision count register (mac_tx_snglecol_cnt_ x) .......... ........... ................ ...... .................................. 269 13.4.2.41 port x mac transmit multiple collision count regist er (mac_tx_multicol_cnt_x) .... ........... .......... ................ ................................... 270 13.4.2.42 port x mac transmit total collision count register (mac_tx_totalcol_cnt_x)......................... ................... .................................... 271 13.4.2.43 port x mac interrupt mask register (mac_imr_x) ........................ ................................................ ............................................................. 272 13.4.2.44 port x mac interrupt pending register (mac_ipr_x) .......................... ........................................... ............................................................ 273 13.4.3 switch engine csrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 13.4.3.1 switch engine alr command register (swe_alr_cmd) ........................ ............................................... ................................................. 274 13.4.3.2 switch engine alr write data 0 register (swe_alr_wr_dat_0) ................ ............................................. ............................................. 275 13.4.3.3 switch engine alr write data 1 register (swe_alr_wr_dat_1) ................ ............................................. ............................................. 276 13.4.3.4 switch engine alr read data 0 register (swe_alr_rd_dat_0)........... ................................................... ............................................. 278 13.4.3.5 switch engine alr read data 1 register (swe_alr_rd_dat_1)........... ................................................... ............................................. 279 13.4.3.6 switch engine alr command status register (swe_alr_cmd_sts) ............................................................ ........................................ 281 13.4.3.7 switch engine alr configuration register (swe_alr_cfg) ............................ ..................................... ................................................... 282 13.4.3.8 switch engine vlan command register (swe_vlan_cmd)................................. .................................... ............................................... 283 13.4.3.9 switch engine vlan write data register (swe_vlan_wr_data)........ ...................................................... ............................................ 284 13.4.3.10 switch engine vlan read data register (swe_vlan_rd_data) .................... .......................................... ............................................ 286 13.4.3.11 switch engine vlan command status register (swe_vlan_cmd_sts) ....................... .................................. ...................................... 288 13.4.3.12 switch engine diffserv table command register (swe_diffserv_tbl_cfg) .................................................. ............................... 289 13.4.3.13 switch engine diffserv table write data register (swe_diffserv_tbl_wr _data) ........................................... ........................... 290 13.4.3.14 switch engine diffserv table read data register (swe_diffserv_tbl_rd_da ta) ............................................ ........................... 291 13.4.3.15 switch engine diffserv table command status register (swe_diffser v_tbl_cmd_sts) ....................................... ..................... 292 13.4.3.16 switch engine global ingress configuration register (swe_globa l_ingrss_cfg)........................................... .................................. 293 13.4.3.17 switch engine port ingress configuration register (swe_port_i ngrss_cfg) ............................................... ...................................... 295 13.4.3.18 switch engine admit only vlan register (swe_admt_only_vlan)................ ........................................... .......................................... 296 13.4.3.19 switch engine port state register (swe_port_state)................. ................................................... ....................................................... 297 13.4.3.20 switch engine priority to queue register (swe_pri_to_que) ................................ ............................. ................................................... 298 13.4.3.21 switch engine port mirroring register (swe_port_mirror)............................. .................................. ................................................... 299 13.4.3.22 switch engine ingress port type register (swe_ingrss_port_typ) .. ...................................................... ........................................... 300 13.4.3.23 switch engine broadcast throttling register (swe_bcst_throt) .......... ................................................ ................................................ 301 13.4.3.24 switch engine admit non member register (swe_admt_n_member)...... ..................................................... ........................................ 302 13.4.3.25 switch engine ingress rate configuration register (swe_ingrss_rate_cfg) ............................................... ..................................... 303 13.4.3.26 switch engine ingress rate command register (swe_ingrss_rate_cmd)........................... .......................... .................................... 304 13.4.3.26.1ingress rate table registers ........................................................................................ .........305 13.4.3.27 switch engine ingress rate command status register (swe_ingrss_rate_cmd_sts) .................. ........................ .......................... 306 13.4.3.28 switch engine ingress rate write data register (swe_ingrss_rate_ wr_data).............................................. ................................. 307 13.4.3.29 switch engine ingress rate read data register (swe_ingrss_rate_rd_data ) ............................................... ................................ 308 13.4.3.30 switch engine port 0 ingress filtered count register (swe_filtered_ cnt_0) ............................................. ........................................ 309 13.4.3.31 switch engine port 1 ingress filtered count register (swe_filtered_ cnt_1) ............................................. ........................................ 310 13.4.3.32 switch engine port 2 ingress filtered count register (swe_filtered_ cnt_2) ............................................. ........................................ 311 13.4.3.33 switch engine port 0 ingress vlan priority regeneration table register (swe_ingrss_regen_tbl_0) ............... ........ .................... 312 13.4.3.34 switch engine port 1 ingress vlan priority regeneration table register (swe_ingrss_regen_tbl_1) ............... ........ .................... 313 13.4.3.35 switch engine port 2 ingress vlan priority regeneration table register (swe_ingrss_regen_tbl_2) ............... ........ .................... 314 13.4.3.36 switch engine port 0 learn discard count register (swe_lrn_discrd_cnt_0) ..................... ......................... .................................... 315 13.4.3.37 switch engine port 1 learn discard count register (swe_lrn_discrd_cnt_1) ..................... ......................... .................................... 316 13.4.3.38 switch engine port 2 learn discard count register (swe_lrn_discrd_cnt_2) ..................... ......................... .................................... 317 13.4.3.39 switch engine interrupt mask register (swe_imr)........................................ ............................... .............................................................. 318 13.4.3.40 switch engine interrupt pending register (swe_ipr)............................... ..................................... ............................................................. 319 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 9 revision 1.5 (07-08-11) datasheet 13.4.4 buffer manager csrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 13.4.4.1 buffer manager configuration register (bm_cfg) .......................... ............................................... ............................................................. 321 13.4.4.2 buffer manager drop level register (bm_drop_lvl)............................... ........................................ ........................................................ 322 13.4.4.3 buffer manager flow control pause level register (bm_fc_pause_lvl)..................... ................................ .......................................... 323 13.4.4.4 buffer manager flow control resume level register (bm_fc_resume_lvl) ..................... .............................. ..................................... 324 13.4.4.5 buffer manager broadcast buffer level register (b m_bcst_lvl)................................................ ........... .................................................. 325 13.4.4.6 buffer manager port 0 drop count register (bm_drp_cnt_src_0) ...................... ..................................... ............................................ 326 13.4.4.7 buffer manager port 1 drop count register (bm_drp_cnt_src_1) ...................... ..................................... ............................................ 327 13.4.4.8 buffer manager port 2 drop count register (bm_drp_cnt_src_2) ...................... ..................................... ............................................ 328 13.4.4.9 buffer manager reset status register (bm_rst_sts) ......................... ............................................. ........................................................ 329 13.4.4.10 buffer manager random discard table command register (bm_rndm_dscrd_tbl_cmd) ........................ .................. ...................... 330 13.4.4.11 buffer manager random discard table write data register (bm_rndm_dscrd_tbl_wdata) ............................. ........ ...................... 331 13.4.4.12 buffer manager random discard table read data register (bm_rndm_dscrd_tbl_rdata)..................... ................. ...................... 332 13.4.4.13 buffer manager egress port type register (bm_egrss_port_type) .......................... ............................... .......................................... 333 13.4.4.14 buffer manager port 0 egress rate priority queue 0/1 register (bm_egrss_rate_00_01) .................. ................. ............................... 335 13.4.4.15 buffer manager port 0 egress rate priority queue 2/3 register (bm_egrss_rate_02_03) .................. ................. ............................... 336 13.4.4.16 buffer manager port 1 egress rate priority queue 0/1 register (bm_egrss_rate_10_11) .................. ................. ............................... 337 13.4.4.17 buffer manager port 1 egress rate priority queue 2/3 register (bm_egrss_rate_12_13) .................. ................. ............................... 338 13.4.4.18 buffer manager port 2 egress rate priority queue 0/1 register (bm_egrss_rate_20_21) .................. ................. ............................... 339 13.4.4.19 buffer manager port 2 egress rate priority queue 2/3 register (bm_egrss_rate_22_23) .................. ................. ............................... 340 13.4.4.20 buffer manager port 0 default vlan id and priority register (bm_vlan_0) .................... ........................... .............................................. 341 13.4.4.21 buffer manager port 1 default vlan id and priority register (bm_vlan_1) .................... ........................... .............................................. 342 13.4.4.22 buffer manager port 2 default vlan id and priority register (bm_vlan_2) .................... ........................... .............................................. 343 13.4.4.23 buffer manager port 0 ingress rate drop count register (bm_rate_drp_cnt_src_0) ....................... ................. .............................. 344 13.4.4.24 buffer manager port 1 ingress rate drop count register (bm_rate_drp_cnt_src_1) ....................... ................. .............................. 345 13.4.4.25 buffer manager port 2 ingress rate drop count register (bm_rate_drp_cnt_src_2) ....................... ................. .............................. 346 13.4.4.26 buffer manager interrupt mask register (bm_imr) .................................. ..................................... .............................................................. 347 13.4.4.27 buffer manager interrupt pending register (bm_ipr) ............................. ....................................... ............................................................. 348 chapter 14 operational characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350 14.1 absolute maximum ratings*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350 14.2 operating conditions** . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350 14.3 power consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 14.4 dc specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 14.5 ac specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 14.5.1 equivalent test load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 14.5.2 reset and configuration strap timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 14.5.3 power-on configuration strap valid timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 14.5.4 mii interface timing (mac mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357 14.5.5 mii interface timing (phy mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 14.5.6 turbo mii interface timing (mac mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361 14.5.7 turbo mii interface timing (phy mode). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 14.5.8 rmii interface timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 14.5.9 smi timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 14.6 clock circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369 chapter 15 package outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370 15.1 56-qfn package outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370 chapter 16 datasheet revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 10 smsc lan9303/lan9303i datasheet list of figures figure 2.1 internal block diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 figure 2.2 mii mac mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 figure 2.3 mii/rmii phy mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 figure 2.4 port 0 mac/phy management modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 figure 3.1 pin assignments (top view) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 figure 5.1 functional interrupt register hiera rchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 figure 6.1 switch fabric csr write access flow diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 figure 6.2 switch fabric csr read access flow diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 figure 6.3 alr table entry structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 figure 6.4 switch engine transmit queue selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2 figure 6.5 switch engine transmit queue calculation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 figure 6.6 vlan table entry structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 figure 6.7 switch engine ingress flow priority selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 8 figure 6.8 switch engine ingress flow priority calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 figure 6.9 hybrid port tagging and un-tagging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 figure 7.1 port x phy block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 figure 7.2 100base-tx transmit data path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 figure 7.3 100base-tx receive data path. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 figure 7.4 direct cable connection vs. cross-over cable connection . . . . . . . . . . . . . . . . . . . . . . . . 101 figure 8.1 i2c cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 figure 8.2 i2c eeprom addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 figure 8.3 i2c eeprom byte read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 figure 8.4 i2c eeprom sequential byte reads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 figure 8.5 i2c eeprom byte write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 figure 8.6 eeprom access flow diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 14 figure 8.7 eeprom loader flow diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 16 figure 8.8 i2c slave addressing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 figure 8.9 i2c slave reads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 figure 8.10 i2c slave writes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 figure 10.1 mii mux management path connections - mac mo de smi managed . . . . . . . . . . . . . . . . 130 figure 10.2 mii mux management path connections - mac mo de i2c managed . . . . . . . . . . . . . . . . . 131 figure 10.3 mii mux management path connections - phy mo de smi managed . . . . . . . . . . . . . . . . . 132 figure 10.4 mii mux management path connections - phy mo de i2c managed . . . . . . . . . . . . . . . . . 133 figure 13.1 base register memory map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 figure 13.2 example switch_mac_addrl, switch_ma c_addrh, and eeprom setup . . . . . . 166 figure 14.1 output equivalent test load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 figure 14.2 nrst reset pin timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 figure 14.3 power-on configuration strap latc hing timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 figure 14.4 mii output timing (mac mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357 figure 14.5 mii input timing (mac mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 figure 14.6 mii output timing (phy mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 figure 14.7 mii input timing (phy mode). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360 figure 14.8 turbo mii output timing (mac mode). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 61 figure 14.9 turbo mii input timing (mac mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 figure 14.10turbo mii output timing (phy mode). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 figure 14.11turbo mii input timing (phy mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364 figure 14.12rmii p0_outclk output mode timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 figure 14.13rmii p0_outclk input mode timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366 figure 14.14smi timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 figure 15.1 56-qfn package definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370 figure 15.2 56-qfn recommended pcb land pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 11 revision 1.5 (07-08-11) datasheet list of tables table 2.1 device modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 table 3.1 lan port 1 pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 table 3.2 lan port 2 pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 table 3.3 lan port 1 & 2 power and common pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 table 3.4 port 0 mii/rmii pins. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 table 3.5 gpio/led/configuration straps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 table 3.6 serial management/eeprom pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 table 3.7 miscellaneous pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 table 3.8 pll pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 table 3.9 core and i/o power and ground pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 table 3.10 lan9303/lan9303i 56-qfn package pin assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 table 3.11 buffer types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 table 4.1 reset sources and affected device circuitry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3 table 4.2 soft-strap configuration strap definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 table 4.3 hard-strap configuration strap defi nitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 table 4.4 pin/shared strap mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 table 6.1 switch fabric flow control enable logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 table 6.2 spanning tree states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 table 6.3 typical ingress rate settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 table 6.4 typical broadcast rate settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 table 6.5 typical egress rate settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 table 7.1 default phy serial mii addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 table 7.2 4b/5b code table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 table 7.3 phy interrupt sources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 table 8.1 i2c eeprom size ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 table 8.2 eeprom contents format overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 table 8.3 eeprom configuration bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 table 10.1 smi frame format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 table 10.2 mii management frame format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 table 12.1 led operation as a function of led_fun[1:0] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 table 13.1 register bit types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 table 13.2 system control and status registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 table 13.3 switch_mac_addrl, switch_mac_addrh, and eeprom byte ordering . . . . . . . . 165 table 13.4 switch fabric csr to switch_csr_direct_d ata address range map . . . . . . . . . . . . 167 table 13.5 virtual phy mii serially adressable register index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 table 13.6 emulated link partner pause fl ow control ability default values . . . . . . . . . . . . . . . . . . . . 182 table 13.7 emulated link partner default advertised ability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 table 13.8 port 1 & 2 phy mii serially adressable registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 table 13.9 10base-t full duplex advertisemen t default value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 table 13.1010base-t half duplex advertisement bit default value . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 table 13.11mode[2:0] definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 table 13.12auto-mdix enable and auto-mdix state bit function ality . . . . . . . . . . . . . . . . . . . . . . . . . 211 table 13.13mdix strap functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 table 13.14indirectly accessible switch cont rol and status registers . . . . . . . . . . . . . . . . . . . . . . . . . 215 table 13.15metering/color table register descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 05 table 14.1 supply and current (10base-t full-duplex) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 table 14.2 supply and current (100base-tx full- duplex) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 table 14.3 supply and current (power management) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 table 14.4 i/o buffer characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 table 14.5 100base-tx transceiver ch aracteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 3 table 14.6 10base-t transceiver char acteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 12 smsc lan9303/lan9303i datasheet table 14.7 nrst reset pin timing values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 table 14.8 power-on configuration strap latching timing values . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 table 14.9 mii output timing values (mac mode). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 57 table 14.10mii input timing values (mac mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 table 14.11mii output timing values (phy mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 59 table 14.12mii input timing values (phy mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360 table 14.13turbo mii output timing values (m ac mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361 table 14.14turbo mii input timing values (mac mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 table 14.15turbo mii output timing values (phy mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 table 14.16turbo mii input timing values (phy mode). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364 table 14.17rmii p0_outclk output mode timing values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 table 14.18rmii p0_outclk input mode timing values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366 table 14.19smi timing values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 table 14.20crystal specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369 table 15.1 56-qfn dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370 table 16.1 customer revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 13 revision 1.5 (07-08-11) datasheet chapter 1 preface 1.1 general terms 10base-t 10base-t (10mbps et hernet, ieee 802.3) 100base-tx 100base-tx (100mbps fast ethernet, ieee 802.3u) adc analog-to-digital converter alr address logic resolution blw baseline wander bm buffer manager - part of the switch fabric bpdu bridge protocol data unit - messages which carry the spanning tree protocol information byte 8-bits csma/cd carrier sense multiple access / collision detect csr control and status registers ctr counter da destination address dword 32-bits epc eeprom controller fcs frame check sequence - the extra checksum characters added to the end of an ethernet frame, used fo r error detection and correction. fifo first in first out buffer fsm finite state machine gpio general purpose i/o host external system (includes proces sor, application software, etc.) igmp internet group management protocol inbound refers to data input to the device from the host level-triggered sticky bit this type of status bit is set whenever the condition that it represents is asserted. the bit remains set until the condition is no longer true, and the status bit is cleared by writing a zero. lsb least significant bit lsb least significant byte mdi medium dependant interface mdix media independent interface with crossover mii media independent interface downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 14 smsc lan9303/lan9303i datasheet miim media independent interface management mil mac interface layer mlt-3 multi-level transmission encoding (3-levels). a tri-level encoding method where a change in the logic level represents a code bit 1 and the logic output remaining at the same level represents a code bit 0. msb most significant bit msb most significant byte nrzi non return to zero inverted. this encoding method inverts the signal for a 1 and leaves the signal unchanged for a 0 n/a not applicable nc no connect oui organizationally unique identifier outbound refers to data output from the device to the host piso parallel in serial out pll phase locked loop ptp precision time protocol reserved refers to a reserved bit field or addr ess. unless otherwise noted, reserved bits must always be zero for write operations. unless otherwise noted, values are not guaranteed when reading reserved bits. unless otherwise noted, do not read or write to reserved addresses. rtc real-time clock sa source address sfd start of frame delimiter - the 8-bit value indicating the end of the preamble of an ethernet frame. sipo serial in parallel out smi serial management interface sqe signal quality error (also known as heartbeat) ssd start of stream delimiter udp user datagram protocol - a connecti onless protocol run on top of ip networks uuid universally unique identifier word 16-bits downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 15 revision 1.5 (07-08-11) datasheet chapter 2 introduction 2.1 general description the lan9303/lan9303i is a full featured, 3 po rt 10/100 managed ethernet switch designed for embedded applications where performance, flexibility, ease of integration and system cost control are required. the lan9303/lan9303i combines all the fu nctions of a 10/100 switch system, including the switch fabric, packet buffers, buffer manager, m edia access controllers (macs), phy transceivers, and serial management. the lan9303/lan9303i complies with the ieee 802.3 (full/half-duplex 10base-t and 100base-tx) etherne t protocol specificatio n and 802.1d/802.1q network management protocol specificati ons, enabling compatibility with i ndustry standard ethernet and fast ethernet applications. at the core of the device is the high performance, high efficiency 3 port ethernet switch fabric. the switch fabric contains a 3 port vlan layer 2 switch engine that supports untagged, vlan tagged, and priority tagged frames. the switch fabric provides an extensive feature set which includes spanning tree protocol support, multicast packe t filtering and quality of service (qos) packet prioritization by vlan tag, dest ination address, port default valu e or diffserv/tos, allowing for a range of prioritization implementations. 32k of buff er ram allows for the storage of multiple packets while forwarding operations are completed, and a 512 entry forwarding table provides ample room for mac address forwarding tables. each port is allocated a cluster of 4 dynamic qos queues which allow each queue size to grow and shrink with traffic, effectively utilizing all available memory. this memory is managed dynamically via the buff er manager block within the switch fabric. all aspects of the switch fabric are managed via the switch fabric configuration and status registers, which are indirectly accessible via the system control and status registers. the lan9303/lan9 303i provides 3 sw itched ports. each port is full y compliant with the ieee 802.3 standard and all internal macs and phys support full/ha lf duplex 10base- t and 100base-tx operation. the lan9303/lan9303i provides 2 on-ch ip phys, 1 virtual phy and 3 macs. the virtual phy and the third mac are used to connect the switch fabric to an external mac or phy. in mac mode, the device can be connected to an external phy via the mii/ turbo mii interface. in phy mode, the device can be connected to an external mac vi a the mii/rmii/turbo mii interface. all ports support automatic or manual full duplex flow control or ha lf duplex backpressure (force d collision) flow control. 2k jumbo packet (2048 byte) support allows for ov ersized packet transfers , effectively increasing throughput while decreasing cpu load. all mac and phy related settings are fully configurable via their respective registers within the device. the integrated i 2 c and smi slave controllers allow for full serial management of the device via the integrated i 2 c or mii interface, respectively. the inclus ion of these interfaces allows for greater flexibility in the incorporat ion of the device into various designs. it is this flexibility which allows the device to operate in 2 different modes and under various management conditions. in both mac and phy modes, the device can be smi managed or i 2 c managed. this flexibility in management makes the lan9303/lan9303i a candidate for vi rtually all switch applications. the lan9303/lan9303i contains an i 2 c master eeprom controller for connection to an optional eeprom. this allows for the storage and retrieval of static data. the internal eeprom loader can be optionally configured to automatically load stored conf iguration settings from the eeprom into the device at reset. the i 2 c management slave and master eeprom controller share common pins. in addition to the primary functionality described above, the lan9303/lan9 303i provides additional features designed for extended functionality. thes e include a configurable 16-bit general purpose timer (gpt), a 32-bit 25mhz fr ee running counter, and 6-bit conf igurable gpio/led interface. the lan9303/lan9303is performance, features and small size make it an ideal solution for many applications in the consumer el ectronics and industrial automati on markets. targeted applications include: set top boxes (cable, satellite and ip), digital televisions, digital video recorders, voice over ip and video phone systems, home gateways, and test and measurement equipment. downloaded from: http:///
smsc lan9303/lan9303i 16 revision 1.5 (07-08-11) datasheet small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet 2.2 block diagram figure 2.1 internal block diagram to optional eeprom (via i 2 c master) eeprom controller i 2 c (master) eeprom loader register access mux smi (slave) controller system registers (csrs) mii mode mux mdio mdio to optional smi master mode configuration straps mdio phy management interface (pmi) mdio registers virtual phy 10/100 phy registers 10/100 phy registers switch registers (csrs) switch fabric dynamic qos 4 queues dynamic qos 4 queues dynamic qos 4 queues switch engine buffer manager search engine frame buffers mii mdio mdio ethernet ethernet lan9303/ lan9303i gpio/led controller to optional gpios/leds system interrupt controller irq gp timer free-run clk system clocks/ reset/pme controller external 25mhz crystal i 2 c port 0 10/100 mac port 1 10/100 mac port 2 10/100 mac mii i 2 c slave controller mode configuration straps mii data path to optional cpu serial management (via i 2 c slave) mii/turbo mii to phy or mii/rmii/turbo mii to mac downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 17 revision 1.5 (07-08-11) datasheet 2.2.1 system clocks/r eset/pme controller a clock module generates all the system clocks required by the devic e. this module in terfaces directly with the external 25mhz crystal/oscillator to gener ate the required clock divisions for each internal module. a 16-bit general purpose timer and 32-bit free-running clock are provided by this module for general purpose use. the port 1 & 2 phys prov ide general power-down and energy detect power- down modes, which allow a reduction in phy power consumption. the device reset events are categorized as chip-level resets, multi-module resets, and single-module resets. these reset events are summarized below: ? chip level resets power-on reset (entire chip reset) nrst pin reset (entire chip reset) ? multi-module reset digital reset (all sub-modules except ethernet phys) ? single-module resets port 2 phy reset port 1 phy reset virtual phy reset 2.2.2 system interrupt controller the device provides a multi-tier programmable inte rrupt structure which is controlled by the system interrupt controller. top level interrupt registers aggregate and control all interrupts from the various sub-modules. the device is capable of generating interrupt events from the following: ? switch fabric ? ethernet phys ? gpios ? general purpose timer ? software (general purpose) a dedicated programmable irq interrupt output pin is provided for external indication of any device interrupts. the irq buffer type, polarity, and de -assertion interval are register configurable. 2.2.3 switch fabric the switch fabric consists of the following majo r function blocks: ? 10/100 macs there is one 10/100 ethernet mac per switch fabric port, which pr ovides basic 10/100 ethernet functionality, including transmission deferral, collision back-off/retry, tx/rx fcs checking/generation, tx/rx pause flow control, and transmit back pressure. the 10/100 macs act as an interface between the switch engine and th e 10/100 phys (for ports 1 and 2). the port 0 10/100 mac interfaces the switch e ngine to the external mac/phy (see section 2.3, "modes of operation" ). each 10/100 mac includes rx and tx fifos and per port statistic counters. ? switch engine this block, consisting of a 3 port vlan layer 2 switching engine, provides the control for all forwarding/filtering rules and supports untagged, vlan tagged, and priority tagged frames. the switch engine provides an extensive feature set which includes spanning tree protocol support, multicast packet filtering and quality of service (qos ) packet prioritization by vlan tag, destination address, and port default value or diffserv/tos, allowing for a range of prioritization implementations. a 512 entry forwarding table pr ovides ample room for mac address forwarding tables. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 18 smsc lan9303/lan9303i datasheet ? buffer manager this block controls the free buffer space, multi-level transmit queues, transmission scheduling, and packet dropping of the switch fabric. 32k of buffer ram allows for the storage of multiple packets while forwarding operations are completed. each port is allocated a cluster of 4 dynamic qos queues which allow each queue size to grow and shrink with traffic, effectively utilizing all available memory. this memory is managed dynamically via the buffer manager block. ? switch csrs this block contains all switch related control and status registers, and allows all aspects of the switch fabric to be managed. these registers ar e indirectly accessible via the system control and status registers. 2.2.4 ethernet phys the device contains three phys: port 1 phy, port 2 phy and a virtual phy. the port 1 & 2 phys are identical in functionality and each connect thei r corresponding ethernet signal pins to the switch fabric mac of their respective port. these phys interface with their respective mac via an internal mii interface. the virtual phy provides the virtual functionality of a phy and allows connection of an external mac to port 0 of the switch fabric as if it was connected to a single port phy. all phys comply with the ieee 802.3 physical layer for twist ed pair ethernet and can be configured for full/half duplex 100 mbps (100base-tx) or 10mbps (10base-t) ethernet operation. all phy registers follow the ieee 802.3 (clause 22.2.4) spec ified mii management register set. 2.2.5 phy management interface (pmi) the phy management interface (pmi) is used to serially access the internal phys as well as the external phy on the mii pins (in mac mode only, see section 2.3, "modes of operation" ). the pmi implements the ieee 802.3 management protocol, providing read/write commands for phy configuration. 2.2.6 i 2 c slave controller this module provides an i 2 c slave interface which can be used for cpu serial management of the device. the i 2 c slave controller implements the low level i 2 c slave serial interface (start and stop condition detection, data bit transmission/receptio n, and acknowledge generation/reception), handles the slave command protocol, and performs system register reads and writes. the i 2 c slave controller conforms to the nxp i 2 c-bus specification . a list of management modes and configurations settings for these modes is discussed in section 2.3, "mode s of operation" 2.2.7 smi slave controller this module provides a smi slave interface whic h can be used for cpu management of the device via the mii pins, and allo ws cpu access to all system csrs. smi uses the same pins and protocol of the ieee mii management function, and differs only in that smi provides access to all internal registers by using a non-standard extended addressing map. the smi protocol co-exists with the mii management protocol by using the upper half of the phy address space (16 through 31). a list of management modes and configurations settings for th ese modes is discussed in section 2.3, "modes of operation" 2.2.8 eeprom controller/loader the eeprom controller is an i 2 c master module which interfaces an optional external eeprom with the system register bus and the eeprom loader. multiple sizes of external eeproms are supported along with various eeprom commands, allowing for the effici ent storage and retrie val of static data. the i 2 c interface conforms to the nxp i 2 c-bus specification . the eeprom loader module interfaces to the eeprom controller, ethernet phys, and the system csrs. the eeprom loader provides the automatic loading of confi guration settings from the downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 19 revision 1.5 (07-08-11) datasheet eeprom into the device at rese t, allowing the device to ope rate unmanaged. the eeprom loader runs upon a pin reset (nrst), power-on reset (por), digital reset, or upon the issuance of a eeprom reload command. 2.2.9 gpio/led controller six configurable general-purpose inpu t/output pins are provided which are controlled via this module. these pins can be individually configured via the gpio/led csrs to function as inputs, push-pull outputs, or open drain outputs and each is capable of interrupt generation with configurable polarity. the gpio pins can be alternatively configured as led outputs to drive ethernet status leds for external indication of various attributes of the switch ports. 2.3 modes of operation the lan9303/lan9303i is designed to integrate into various embedded environments. to accomplish compatibility with a wide range of applications, the lan9303/lan9303i ports can operate in the following modes: ? port 0 - independently configured for mii mac, mii phy, rmii phy modes ? port 1 - internal phy mode ? port 2 - internal phy mode the mode of the device is determined by the p0_mode[2:0] (port 0) pin straps. the device can also be placed into the following management modes: ? smi managed ? i 2 c managed the management mode is determined by the mngt1_led4p and mngt0_led3p pin straps. these modes are detailed in the following sections. figure 2.4 displays a typical system configuration for each port 0 mode and management type supported by the device. refer to chapter 9, "mii data interface," on page 123 for additional information on the usage of mii signals in each supported mode. 2.3.1 internal phy mode internal phy mode (port 1 and port 2) utilizes the internal phy for the network connection. the switch engine macs mii port is connected internally to the internal phy in this mode. internal phy mode can operate at 10mbps or 100mbps. when an eeprom is connected, the eeprom loader can be used to load the initial device configuration from the ex ternal eeprom via the i 2 c interface. once operational, if managed, the cpu can use the i 2 c interface to read or write the eeprom. 2.3.2 mac mode mac mode utilizes an external phy, which is connect ed to the port 0 mii pins, to provide an ethernet network connection. in this mode, the port acts as a mac, providing a communication path between the switch fabric and the external phy. mac mo de can operate at 10, 100, or 200mbps (turbo mode). in mac mode, the device may be smi managed or i 2 c managed as detailed in section 2.3.4, "management modes" . when an eeprom is connected, the eeprom loader can be used to load the initial device configuration from the ex ternal eeprom via the i 2 c interface. once operational, if managed, the cpu can use the i 2 c interface to read or write the eeprom. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 20 smsc lan9303/lan9303i datasheet 2.3.3 phy mode phy mode utilizes an external mac to provide a network path for the cpu. phy mode supports mii and rmii interfaces. the external mii/rmii pins mu st be connected to an external mac, providing a communication path to the switch fabric. mii ph y mode can operate at 10, 100, or 200mbps (turbo mode). rmii phy mode can operate at 10 or 10 0mbps. in phy mode, the device may be smi managed or i 2 c managed as detailed in section 2.3.4, "management modes" . when an eeprom is connected, the eeprom loader can be used to load the initial device configuration from the ex ternal eeprom via the i 2 c interface. once operational, if managed, the cpu can use the i 2 c interface to read or write the eeprom. 2.3.4 management modes various modes of management are provided in bot h mac and phy modes of operation. two separate interfaces may be used for management: the i 2 c interface or the smi/miim (media independent interface management) slave interface. the i 2 c interface runs as an i 2 c slave. the slave mode is used as a register access path for an external cpu. the i 2 c slave and i 2 c master eeprom interface are shared interfaces. figure 2.2 mii mac mode figure 2.3 mii/rmii phy mode 10/100 phy ethernet magnetics mii miim/ smi eeprom (optional) i 2 c eeprom/ i 2 c slave i 2 c lan9303/ lan9303i mii 10/100 mac mii eeprom (optional) i 2 c miim/ smi lan9303/ lan9303i mii i 2 c eeprom/ i 2 c slave 10/100 mac rmii eeprom (optional) i 2 c miim/ smi lan9303/ lan9303i rmii i 2 c eeprom/ i 2 c slave downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 21 revision 1.5 (07-08-11) datasheet the smi/miim interface runs as ei ther an smi/miim slave or miim master. the master mode is used to access an external phys registers under cpu control (assuming the cpu is using i 2 c). the slave mode is used for register access by the cpu or external mac and provides access to either the internal port 1&2 phy registers or to all non-phy registers (using addresses 16-31 and a non-standard extended address map). miim and smi use the same pins and protocol and differ only in that smi provides access to all internal registers while miim provides access to only the port 1&2 phy registers. a special mode provides access to the virtual phy, which mimics the register operation of a single port standalone phy. this is used for so ftware compatibility in managed operation. the selection of management modes is determined at startup via the p0_mode[2:0] , mngt1_led4p , and mngt0_led3p straps as detailed in ta b l e 2 . 1 . system configuration diagrams for each mode are provided in figure 2.4 . table 2.1 device modes mode i 2 c interface (master/slave) smi/miim interface p0_mode[2:0] strap value mngt1_led4p , mngt0_led3p st rap value mac smi i 2 c master used to load initial configuration from eeprom and for cpu r/w access to eeprom smi/miim slave, used for cpu access to internal phys and non-phy registers 000 01 mac i 2 ci 2 c master used to load initial configuration from eeprom and for cpu r/w access to eeprom i 2 c slave used for management miim master, used for cpu access to external phy registers 000 10 phy smi i 2 c master used to load initial configuration from eeprom and for cpu r/w access to eeprom smi/miim slave, used for cpu access to internal phys, virtual phy, and non- phy registers 001, 010, 011, 100, 101, or 110 01 phy i 2 ci 2 c master used to load initial configuration from eeprom and for cpu r/w access to eeprom i 2 c slave used for management virtual miim slave, used for external mac access to virtual phy registers 001, 010, 011, 100, 101, or 110 10 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 22 smsc lan9303/lan9303i datasheet figure 2.4 port 0 mac/phy management modes lan9303/lan9303i mac modes ethernet magnetics ethernet magnetics 10/100 phy ethernet magnetics mii eeprom (optional) lan9303/ lan9303i i 2 c eeprom/ i 2 c slave i 2 c miim/ smi smi managed i 2 c managed microprocessor/ microcontroller smi/miim miim ethernet magnetics ethernet magnetics 10/100 phy ethernet magnetics mii i 2 c miim/ smi microprocessor/ microcontroller eeprom (optional) i 2 c eeprom/ i 2 c slave i 2 c lan9303/ lan9303i lan9303/lan9303i phy modes smi managed i 2 c managed mii mii ethernet magnetics ethernet magnetics 10/100 mac mii eeprom (optional) i 2 c miim/ smi microprocessor/ microcontroller smi/miim lan9303/ lan9303i rmii/ mii i 2 c eeprom/ i 2 c slave ethernet magnetics ethernet magnetics 10/100 mac mii miim/ smi microprocessor/ microcontroller eeprom (optional) i 2 c lan9303/ lan9303i i 2 c eeprom/ i 2 c slave rmii/ mii i 2 c ethernet miim miim downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 23 revision 1.5 (07-08-11) datasheet chapter 3 pin description and configuration 3.1 pin diagram 3.1.1 56-qfn pin diagram figure 3.1 pin assignments (top view) vss note: exposed pad (vss) on bottom of package must be connected to ground note: when hp auto-mdix is activated, the txn/txp pins can function as rxn/rxp and vi ce-versa smsc lan9303/lan9303i 56 pin qfn (top view) txp1 txn1 led1/gpio1/amdix2_led1p p0_outd0/p0_mode0 12 3 4 5 6 7 8 9 1011 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 4241 40 39 38 37 36 35 34 33 32 31 30 29 56 55 54 53 52 51 50 49 48 47 46 45 44 43 p0_outd1/p0_mode1 p0_outd2/p0_mode2 p0_outd3/duplex_pol_0 vdd18core vdd33io p0_inclk p0_iner p0_indv p0_ind0 p0_ind1 p0_ind2 p0_ind3 txn2 vdd18pll xo xi irq nrst ee_scl/scl ee_sda/sda test2 test1 vdd33io vdd18core vdd33io led0/gpio0/amdix1_led0p vdd33a1 rxn1 rxp1 vdd33a1 vdd18tx1 exres vdd33bias vdd18tx2 vdd33a2 rxp2 rxn2 vdd33a2 txp2 led2/gpio2/e2psize_led2p led3/gpio3/mngt0_led3p led4/gpio4/mngt1_led4p led5/gpio5/phyaddr_led5p vdd33io mdc mdio p0_duplex p0_crs p0_col p0_outclk p0_outdv vdd33io downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 24 smsc lan9303/lan9303i datasheet 3.2 pin descriptions this section contains the descriptions of the devic e pins. the pin descriptions have been broken into functional groups as follows: ? lan port 1 pins ? lan port 2 pins ? lan port 1 & 2 power and common pins ? port 0 mii/rmii pins ? gpio/led/configuration straps ? serial management/eeprom pins ? miscellaneous pins ? pll pins ? core and i/o power and ground pins note: a list of buffer type definitions is provided in section 3.3, "buffer types," on page 41 . note: please refer to the lan9303/lan9303i reference schematic and lancheck schematic checklist on the smsc website for additional connection information. note 3.1 the pin names for the twisted pair pins apply to a normal connection. if hp auto-mdix is enabled and a reverse connection is detected or manually selected, the rx and tx pins will be swapped internally. table 3.1 lan port 1 pins num pins name symbol buffer type description 1 port 1 ethernet tx negative txn1 aio negative output of port 1 ethernet transmitter. see note 3.1 . 1 port 1 ethernet tx positive txp1 aio positive output of port 1 ethernet transmitter. see note 3.1 . 1 port 1 ethernet rx negative rxn1 aio negative input of po rt 1 ethernet receiver. see note 3.1 . 1 port 1 ethernet rx positive rxp1 aio positive input of port 1 ethernet receiver. see note 3.1 . table 3.2 lan port 2 pins num pins name symbol buffer type description 1 port 2 ethernet tx negative txn2 aio negative output of port 2 ethernet transmitter. see note 3.2 . 1 port 2 ethernet tx positive txp2 aio positive output of port 2 ethernet transmitter. see note 3.2 . 1 port 2 ethernet rx negative rxn2 aio negative input of po rt 2 ethernet receiver. see note 3.2 . 1 port 2 ethernet rx positive rxp2 aio positive input of port 2 ethernet receiver. see note 3.2 . downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 25 revision 1.5 (07-08-11) datasheet note 3.2 the pin names for the twisted pair pins apply to a normal connection. if hp auto-mdix is enabled and a reverse connection is detected or manually selected, the rx and tx pins will be swapped internally. note 3.3 please refer to the lan9303/lan9303i refe rence schematic and lancheck schematic checklist on the smsc website for additional connection information. table 3.3 lan port 1 & 2 power and common pins num pins name symbol buffer type description 1 bias reference exres ai used for internal bias circuits. connect to an external 12.4k ohm, 1% resistor to ground. 2 +3.3v port 1 analog power supply vdd33a1 p see note 3.3 . 2 +3.3v port 2 analog power supply vdd33a2 p see note 3.3 . 1 +3.3v master bias power supply vdd33bias p see note 3.3 . 1 port 2 transmitter +1.8v power supply vdd18tx2 p this pin is supplied from the internal phy voltage regulator. this pin must be tied to the vdd18tx1 pin for proper operation. see note 3.3 . 1 port 1 transmitter +1.8v power supply vdd18tx1 p this pin must be connected directly to the vdd18tx2 pin for proper operation. see note 3.3 . table 3.4 port 0 mii/rmii pins num pins name symbol buffer type description 1 port 0 mii input data 3 p0_ind3 is (pd) mii mac mode: this pin is the receive data 3 bit from the external phy to the switch. is (pd) mii phy mode: this pin is the transmit data 3 bit from the external mac to the switch. the pull-down and input buffer are disabled when the isolate (vphy_iso) bit is set in the virtual phy basic control register (vphy_basic_ctrl) . - rmii phy mode: this pin is not used. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 26 smsc lan9303/lan9303i datasheet 1 port 0 mii input data 2 p0_ind2 is (pd) mii mac mode: this pin is the receive data 2 bit from the external phy to the switch. is (pd) mii phy mode: this pin is transmit data 2 bit from the external mac to the switch. the pull-down and input buffer are disabled when the isolate (vphy_iso) bit is set in the virtual phy basic control register (vphy_basic_ctrl) . - rmii phy mode: this pin is not used. 1 port 0 mii input data 1 p0_ind1 is (pd) mii mac mode: this pin is the receive data 1 bit from the external phy to the switch. is (pd) mii phy mode: this pin is the transmit data 1 bit from the external mac to the switch. the pull-down and input buffer are disabled when the isolate (vphy_iso) bit is set in the virtual phy basic control register (vphy_basic_ctrl) . is (pd) rmii phy mode: this pin is the transmit data 1 bit from the external mac to the switch. the pull-down and input buffer are disabled when the isolate (vphy_iso) bit is set in the virtual phy basic control register (vphy_basic_ctrl) . 1 port 0 mii input data 0 p0_ind0 is (pd) mii mac mode: this pin is the receive data 0 bit from the external phy to the switch. is (pd) mii phy mode: this pin is the transmit data 0 bit from the external mac to the switch. the pull-down and input buffer are disabled when the isolate (vphy_iso) bit is set in the virtual phy basic control register (vphy_basic_ctrl) . is (pd) rmii phy mode: this pin is the transmit data 0 bit from the external mac to the switch. the pull-down and input buffer are disabled when the isolate (vphy_iso) bit is set in the virtual phy basic control register (vphy_basic_ctrl) . 1 port 0 mii input data valid p0_indv is (pd) mii mac mode: this pin is the rx_dv signal from the external phy and indicates valid data on p0_ind[3:0] and p0_iner. is (pd) mii phy mode: this pin is the tx_en signal from the external mac and indicates valid data on p0_ind[3:0] and p0_ine r. the pull-down and input buffer are disabled when the isolate (vphy_iso) bit is set in the virtual phy basic control register (vphy_basic_ctrl) . is (pd) rmii phy mode: this pin is the tx_en signal from the external mac and indicates valid data on p0_ind[1:0]. the pull-down and input buffer are disabled when the isolate (vphy_iso) bit is set in the virtual phy basic control register (vphy_basic_ctrl) . table 3.4 port 0 mii/rmii pins (continued) num pins name symbol buffer type description downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 27 revision 1.5 (07-08-11) datasheet 1 port 0 mii input error p0_iner is (pd) mii mac mode: this pin is the rx_er signal from the external phy and indicates a receive error in the packet. is (pd) mii phy mode: this pin is the tx_er signal from the external mac and indicates that the current packet should be aborted. the pull-down and input buffer are disabled when the isolate (vphy_iso) bit is set in the virtual phy basic control register (vphy_basic_ctrl) . - rmii phy mode: this pin is not used. 1 port 0 mii input reference clock p0_inclk is (pd) mii mac mode: this pin is an input and is used as the reference clock for the p0_ind[3:0], p0_iner, and p0_indv pins. it is connected to the receive clock of the external phy. o12/o16 mii phy mode: this pin is an output and is used as the reference clock for the p0_ind[3:0], p0_iner, and p0_indv pins. it is connected to the transmit clock of the ex ternal mac. the output driver is disabled when the isolate (vphy_iso) bit is set in the virtual phy basic control register (vphy_basic_ctrl) . when operating at 200mbps, the choice of drive strength is based on the setting of the rmii/turbo mii clock strength bit in the virtual phy special control/status register (vphy_special_control_status) . a low selects a 12 ma drive, while a high selects a 16 ma drive. a series terminating resistor is recommended for the best pcb signal integrity. - rmii phy mode: this pin is not used. 1 port 0 mii output data 3 p0_outd3 o8 mii mac mode: this pin is the transmit data 3 bit from the switch to the external phy. o8 mii phy mode: this pin is the receive data 3 bit from the switch to the ex ternal mac. the output driver is disabled when the isolate (vphy_iso) bit is set in the virtual phy basic control register (vphy_basic_ctrl) . - rmii phy mode: this pin is not used port 0 duplex polarity configuration strap duplex_pol_0 is (pu) note 3.5 this strap selects the default of the duplex polarity strap for port 0 mii ( duplex_pol_strap_0 ). see note 3.4 . if the strap is value is 0, a 0 on p0_duplex means full duplex while a 1 means half duplex. if the strap value is 1, a 1 on p0_duplex means full duplex, while a 0 means half duplex. table 3.4 port 0 mii/rmii pins (continued) num pins name symbol buffer type description downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 28 smsc lan9303/lan9303i datasheet 1 port 0 mii output data 2 p0_outd2 o8 mii mac mode: this pin is the transmit data 2 bit from the switch to the external phy. o8 mii phy mode: this pin is the receive data 2 bit from the switch to the ex ternal mac. the output driver is disabled when the isolate (vphy_iso) bit is set in the virtual phy basic control register (vphy_basic_ctrl) . - rmii phy mode: this pin is not used port 0 mode[2] configuration strap p0_mode2 is (pu) note 3.5 this strap configures the mode for port 0. see note 3.4 . please refer to the p0_mode0 strap entry for mode encoding details. 1 port 0 mii output data 1 p0_outd1 o8 mii mac mode: this pin is the transmit data 1 bit from the switch to the external phy. o8 mii phy mode: this pin is the receive data 1 bit from the switch to the ex ternal mac. the output driver is disabled when the isolate (vphy_iso) bit is set in the virtual phy basic control register (vphy_basic_ctrl) . o8 rmii phy mode: this pin is the receive data 1 bit from the switch to the ex ternal mac. the output driver is disabled when the isolate (vphy_iso) bit is set in the virtual phy basic control register (vphy_basic_ctrl) . port 0 mode[1] configuration strap p0_mode1 is (pu) note 3.5 this strap configures the mode for port 0. see note 3.4 . please refer to the p0_mode0 strap entry for mode encoding details. table 3.4 port 0 mii/rmii pins (continued) num pins name symbol buffer type description downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 29 revision 1.5 (07-08-11) datasheet 1 port 0 mii output data 0 p0_outd0 o8 mii mac mode: this pin is the transmit data 0 bit from the switch to the external phy. o8 mii phy mode: this pin is the receive data 0 bit from the switch to the ex ternal mac. the output driver is disabled when the isolate (vphy_iso) bit is set in the virtual phy basic control register (vphy_basic_ctrl) . o8 rmii phy mode: this pin is the receive data 0 bit from the switch to the ex ternal mac. the output driver is disabled when the isolate (vphy_iso) bit is set in the virtual phy basic control register (vphy_basic_ctrl) . port 0 mode[0] configuration strap p0_mode0 is (pu) note 3.5 this strap configures the mode for port 0. see note 3.4 . the p0_mode[2:0] configuration st rap encoding is as follows: 000 = mii mac mode 001 = mii phy mode 010 = mii phy mode 200 mbps 12 ma clock output 011 = mii phy mode 200 mbps 16 ma clock output 100 = rmii phy mode clock is 12 ma output 101 = rmii phy mode clock is 16 ma output 110 = rmii phy mode clock is input 111 = reserved 1 port 0 mii output data valid p0_outdv o8 mii mac mode: this pin is the tx_en signal to the external phy and indicates valid data on p0_outd[3:0]. o8 mii phy mode: this pin is the rx_dv signal to the external mac. the output driver is disabled when the isolate (vphy_iso) bit is set in the virtual phy basic control register (vphy_basic_ctrl) . o8 rmii phy mode: this pin is the crs_dv signal to the external mac. the output driver is disabled when the isolate (vphy_iso) bit is set in the virtual phy basic control register (vphy_basic_ctrl) . table 3.4 port 0 mii/rmii pins (continued) num pins name symbol buffer type description downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 30 smsc lan9303/lan9303i datasheet 1 port 0 mii output reference clock p0_outclk is (pd) mii mac mode: this pin is an input and is used as the reference clock for the p0_outd[3:0] and p0_outdv pins. it is connected to the transmit clock of the external phy. o12/o16 mii phy mode: this pin is an output and is used as the reference clock for the p0_out[3:0] and p0_outdv pins. it is connected to the receive clock of the external mac. the output driver is disabled when the isolate (vphy_iso) bit is set in the virtual phy basic control register (vphy_basic_ctrl) . when operating at 200mbps, the choice of drive strength is based on the setting of the rmii/turbo mii clock strength bit in the virtual phy special control/status register (vphy_special_control_status) . a low selects a 12 ma drive, while a high selects a 16 ma drive. a series terminating resistor is recommended for the best pcb signal integrity. is/o12/ o16 (pd) rmii phy mode: this pin is an input or an output running at 50 mhz and is used as the reference clock for the p0_ind[1:0], p0_indv, p0_outd[1:0], and p0_outdv pins. the choice of input verses output is based on the setting of the rmii clock direction bit in the virtual phy special control/status register (vphy_special_control_status) . a low selects p0_outclk as an input and a high selects p0_outclk as an output. as an input, the pull-down is normally enabled. the input buffer and pull-down are disabled when the isolate (vphy_iso) bit is set in the virtual phy basic control register (vphy_basic_ctrl) . as an output, the input buffer and pull-down are disabled. the choice of drive strength is based on the mii virtual phy rmii/turbo mii clock strength bit. a low selects a 12 ma drive, while a high selects a 16 ma drive. the output driver is disabled when the isolate (vphy_iso) bit is set in the virtual phy basic control register (vphy_basic_ctrl) . a series terminating resistor is recommended for the best pcb signal integrity. 1 port 0 mii collision p0_col is (pu) mii mac mode: this pin is an input from the external phy and indicates a collision event. o8 mii phy mode: this pin is an output to the external mac indicating a collision event. the output driver is disabled when the isolate (vphy_iso) bit is set in the virtual phy basic control register (vphy_basic_ctrl) . - rmii phy mode: this pin is not used. table 3.4 port 0 mii/rmii pins (continued) num pins name symbol buffer type description downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 31 revision 1.5 (07-08-11) datasheet note 3.4 configuration strap pins are identified by an underlined symbol name. configuration strap values are latched on power-on reset or nrst de-assertion. additional strap pins, which share functionality with the gp io/led pins, are described in ta b l e 3 . 5 . some configuration straps can be overridden by values from the eeprom loader. please refer to section 4.2.4, "configuration straps," on page 46 for further information. note 3.5 an external supplemental pull-up may be needed, depending upon the input current loading of the external mac/phy device. 1 port 0 mii carrier sense p0_crs is (pd) mii mac mode: this pin is an input from the external phy indicating a network carrier. o8 mii phy mode: this pin is an output to the external mac indicating a network carrier. the output driver is disabled when the isolate (vphy_iso) bit is set in the virtual phy basic control register (vphy_basic_ctrl) . - rmii phy mode: this pin is not used. 1 port 0 mii duplex p0_duplex is (pu) mii mac mode: this pin can be changed at any time (live value) and can be overridden by enabling the auto-negotiation (vphy_an) bit in the virtual phy basic control register (vphy_basic_ctrl) . it is typically tied to the duplex indication from the external phy. please refer to the definition of the duplex_pol_0 strap for further details. is (pu) mii phy and rmii phy modes: this pin is used to determine the virtual link partners ability bits and is typically tied high or low, as needed. please refer to the definition of the duplex_pol_0 strap for further details. 1 management data input/output mdio is/o8 smi/mii slave management modes: this is the data to/from an external master mii master management modes: this is the data to/from an external phy. note: an external pull-up is required when the smi or mii management interface is used, to ensure that the id le state of the mdio signal is a logic one. note: an external pull-up is recommended when the smi or mii management interface is not used, to avoid a floating signal. 1 mii management clock mdc is smi/mii slave management modes: this is the clock input from an external master. note: when smi or mii is not used, an external pull-down is recommended to avoid a floating signal. o8 mii master management modes: this is the clock output to an external phy. table 3.4 port 0 mii/rmii pins (continued) num pins name symbol buffer type description downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 32 smsc lan9303/lan9303i datasheet table 3.5 gpio/led/configuration straps num pins name symbol buffer type description 1 led 5 led5 o12/ od12/ os12 this pin is configured to operate as an led when the led 5 enable bit of the led configuration register (led_cfg) is set. the buffer type depends on the setting of the led function 1-0 (led_fun[1:0]) field in the led configuration register (led_cfg) and is configured to be either an push-pull or open-drain/open-source output. when selected as an open-drain/open-source output, the polarity of this pin depends upon the phyaddr_led5p strap value sampled at reset. gpio 5 gpio5 is/o12/ od12 (pu) this pin is configured to operate as a gpio when the led 5 enable bit of the led configuration register (led_cfg) is clear. the pin is fully programmable as either a push-pull output, an open-drain output, or a schmitt-triggered input by writing the general purpose i/o configuration register (gpio_cfg) and the general purpose i/o data & direction register (gpio_data_dir) . phy address and led 5 polarity configuration strap phyaddr_led5p is (pu) this strap configures the default value of the mii management address for the phys and virtual phy, as well as the polarity of the led 5 pin when it is an open-drain or open-source output. see note 3.6 . if the strap value is 0: the phy address values are as follows: virtual phy = 0 phy port 1 = 1 phy port 2 = 2 the led is set as active high, since it is assumed that a led to ground is used as the pull-down. if the strap value is 1: the phy address values are as follows: virtual phy = 1 phy port 1 = 2 phy port 2 = 3 the led is set as active low, since it is assumed that a led to vdd is used as the pull-up. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 33 revision 1.5 (07-08-11) datasheet 1 led 4 led4 o12/ od12/ os12 this pin is configured to operate as an led when the led 4 enable bit in the led configuration register (led_cfg) is set. the buffer type depends on the setting of the led function 1-0 (led_fun[1:0]) field in the led configuration register (led_cfg) and is configured to be either an push-pull or open-drain/open-source output. when selected as an open-drain/open-source output, the polarity of this pin depends up the mngt1_led4p strap value sampled at reset. gpio 4 gpio4 is/o12/ od12 (pu) this pin is configured to operate as a gpio when the led 4 enable bit of the led configuration register (led_cfg) is clear. the pin is fully programmable as either a push-pull output, an open-drain output, or a schmitt-triggered input by writing the general purpose i/o configuration register (gpio_cfg) and the general purpose i/o data & direction register (gpio_data_dir) . serial management mode[1] and led 4 polarity configuration strap mngt1_led4p is (pu) this strap configures the serial management mode, as well as the polarity of the led 4 pin when it is an open-drain or open-source output. see note 3.6 . if the strap value is 0: the led is set as active high, since it is assumed that a led to ground is used as the pull-down. if the strap value is 1: the led is set as active low, since it is assumed that a led to vdd is used as the pull-up. table 3.5 gpio/led/configu ration straps (continued) num pins name symbol buffer type description downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 34 smsc lan9303/lan9303i datasheet 1 led 3 led3 o12/ od12/ os12 this pin is configured to operate as an led when the led 3 enable bit in the led configuration register (led_cfg) is set. the buffer type depends on the setting of the led function 1-0 (led_fun[1:0]) field in the led configuration register (led_cfg) and is configured to be either an push-pull or open-drain/open-source output. when selected as an open-drain/open-source output, the polarity of this pin depends up the mngt0_led3p strap value sampled at reset. gpio 3 gpio3 is/o12/ od12 (pu) this pin is configured to operate as a gpio when the led 3 enable bit of the led configuration register (led_cfg) is clear. the pin is fully programmable as either a push-pull output, an open-drain output, or a schmitt-triggered input by writing the general purpose i/o configuration register (gpio_cfg) and the general purpose i/o data & direction register (gpio_data_dir) . serial management mode[0] and led 3 polarity configuration strap mngt0_led3p is (pu) this strap configures the serial management mode, as well as the polarity of the led 3 pin when it is an open-drain or open-source output. see note 3.6 . for led3, if the strap value is 0: the led is set as active high, since it is assumed that a led to ground is used as the pull-down. if the strap value is 1: the led is set as active low, since it is assumed that a led to vdd is used as the pull-up. table 3.5 gpio/led/configu ration straps (continued) num pins name symbol buffer type description downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 35 revision 1.5 (07-08-11) datasheet 1 led 2 led2 o12/ od12/ os12 this pin is configured to operate as an led when the led 2 enable bit in the led configuration register (led_cfg) is set. the buffer type depends on the setting of the led function 1-0 (led_fun[1:0]) field in the led configuration register (led_cfg) and is configured to be either an push-pull or open-drain/open-source output. when selected as an open-drain/open-source output, the polarity of this pin depends up the e2psize_led2p strap value sampled at reset. gpio 2 gpio2 is/o12/ od12 (pu) this pin is configured to operate as a gpio when the led 2 enable bit of the led configuration register (led_cfg) is clear. the pin is fully programmable as either a push-pull output, an open-drain output, or a schmitt-triggered input by writing the general purpose i/o configuration register (gpio_cfg) and the general purpose i/o data & direction register (gpio_data_dir) . eeprom size and led 2 polarity configuration strap e2psize_led2p is (pu) this strap configures the eeprom size, as well as the polarity of the led 2 pin when it is an open- drain or open-source output. see note 3.6 . the low bit of the eeprom size range is set to the strap value. when 0, eeprom sizes 16 x 8 through 2048 x 8 are supported. when 1, eeprom sizes 4096 x 8 through 65536 x 8 are supported. for led 2, if the strap value is 0: the led is set as active high, since it is assumed that a led to ground is used as the pull-down. if the strap value is 1: the led is set as active low, since it is assumed that a led to vdd is used as the pull-up. table 3.5 gpio/led/configu ration straps (continued) num pins name symbol buffer type description downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 36 smsc lan9303/lan9303i datasheet 1 led 1 led1 o12/ od12/ os12 this pin is configured to operate as an led when the led 1 enable bit in the led configuration register (led_cfg) is set. the buffer type depends on the setting of the led function 1-0 (led_fun[1:0]) field in the led configuration register (led_cfg) and is configured to be either an push-pull or open-drain/open-source output. when selected as an open-drain/open-source output, the polarity of this pin depends up the amdix2_led1p strap value sampled at reset. gpio 1 gpio1 is/o12/ od12 (pu) this pin is configured to operate as a gpio when the led 1 enable bit of the led configuration register (led_cfg) is clear. the pin is fully programmable as either a push-pull output, an open-drain output, or a schmitt-triggered input by writing the general purpose i/o configuration register (gpio_cfg) and the general purpose i/o data & direction register (gpio_data_dir) . port 2 auto- mdix enable and led 1 polarity configuration strap amdix2_led1p is (pu) this strap configures the default for the auto-mdix soft-strap for lan port 2, as well as the polarity of the led 1 pin when it is an open-drain or open- source output. see note 3.6 . the strap value determines whether or not lan port 2 auto-mdix is enables as follows: 0 = disabled 1 = enabled for led 1, if the strap value is 0: the led is set as active high, since it is assumed that a led to ground is used as the pull-down. if the strap value is 1: the led is set as active low, since it is assumed that a led to vdd is used as the pull-up. table 3.5 gpio/led/configu ration straps (continued) num pins name symbol buffer type description downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 37 revision 1.5 (07-08-11) datasheet note 3.6 configuration strap pins are identified by an underlined symbol name. configuration strap values are latched on power-on reset or nrst de-assertion. in addition to the configuration strap pins that control gpio/led and auto-mdix operation listed in ta b l e 3 . 5 , configuration strap pins are associated with po rt 0 and control its operation. they are described in ta b l e 3 . 4 . some configuration straps can be overridden by values from the eeprom loader. please refer to section 4.2.4, "configuration straps," on page 46 for further information. 1 led 0 led0 o12/ od12/ os12 this pin is configured to operate as an led when the led 0 enable bit in the led configuration register (led_cfg) is set. the buffer type depends on the setting of the field in the led configuration register (led_cfg) and is configured to be either an push-pull or open- drain/open-source output. when selected as an open-drain/open-source output , the polarity of this pin depends up the amdix1_led0p strap value sampled at reset. gpio 0 gpio0 is/o12/ od12 (pu) this pin is configured to operate as a gpio when the led 0 enable bit of the led configuration register (led_cfg) is clear. the pin is fully programmable as either a push-pull output, an open-drain output, or a schmitt-triggered input by writing the general purpose i/o configuration register (gpio_cfg) and the general purpose i/o data & direction register (gpio_data_dir) . port 1 auto- mdix enable and led 0 polarity configuration strap amdix1_led0p is (pu) this strap configures the default for the auto-mdix soft-strap for lan port 1, as well as the polarity of the led 0 pin when it is an open-drain or open- source output. see note 3.6 . the strap value determines whether or not lan port 1 auto-mdix is enabled as follows: 0 = disabled 1 = enabled for led 0, if the strap value is 0: the led is set as active high, since it is assumed that a led to ground is used as the pull-down. if the strap value is 1: the led is set as active low, since it is assumed that a led to vdd is used as the pull-up. table 3.5 gpio/led/configu ration straps (continued) num pins name symbol buffer type description downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 38 smsc lan9303/lan9303i datasheet note: please refer to chapter 8, "serial management," on page 108 for additional information regarding serial management co nfiguration and functionality. table 3.6 serial management/eeprom pins num pins name symbol buffer type description 1 eeprom i 2 c serial data input/output ee_sda is/od8 when the device is accessing an external eeprom, this pin is the i 2 c serial data input/output. note: this pin must be pulled-up by an external resistor at all times. i 2 c slave serial data input/output (i 2 c slave mode) sda is/od8 in i 2 c slave mode, this pin is the i 2 c serial data input/output from/to the external master. note: this pin must be pulled-up by an external resistor at all times. 1 eeprom i 2 c serial clock ee_scl is/od8 when the device is accessing an external eeprom, this pin is the i 2 c clock input/open-drain output. note: this pin must be pulled-up by an external resistor at all times. i 2 c slave serial clock (i 2 c slave mode) scl is in i 2 c slave mode, this pin is the i 2 c clock input from the external master. note: this pin must be pulled-up by an external resistor at all times. table 3.7 miscellaneous pins num pins name symbol buffer type description 1 interrupt output irq o8/od8 the polarity, source and buffer type of this signal is programmable via the interrupt configuration register (irq_cfg) . please refer to chapter 5, "system interrupts," on page 55 for further details. 1 system reset input nrst is (pu) this active low signal allows external hardware to reset the device. the devi ce also contains an internal power-on reset circuit. thus, this signal may be left unconnected if an external hardware reset is not needed. when used, this signal must adhere to the reset timing requirements as detailed in the section 14.5.2, "reset and configuration strap timing," on page 355 . 1 test 1 test1 ai this pin must be tied to vdd33io for proper operation. 1 test 2 test2 is (pd) this pin must be tied to vss for proper operation. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 39 revision 1.5 (07-08-11) datasheet note 3.7 please refer to the lan9303/lan9303i refe rence schematic and lancheck schematic checklist on the smsc website for additional connection information. note 3.8 please refer to the lan9303/lan9303i refe rence schematic and lancheck schematic checklist on the smsc website for additional connection information. table 3.8 pll pins num pins name symbol buffer type description 1 pll +1.8v power supply vdd18pll p this pin must be connected to vdd18core for proper operation. see note 3.7 . 1 crystal input xi iclk external 25mhz cryst al input. this signal can also be driven by a single-ended clock oscillator. when this method is used, xo should be left unconnected. 1 crystal output xo oclk external 25mhz crystal output. table 3.9 core and i/o power and ground pins num pins name symbol buffer type description 5 +3.3v i/o power vdd33io p +3.3v power supply for i/o pins and internal regulator. see note 3.8 . 2 digital core +1.8v power supply output vdd18core p +1.8v power from the internal core voltage regulator. all vdd18core pins must be tied together for proper operation. see note 3.8 . 1 pad common ground vss p ground downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 40 smsc lan9303/lan9303i datasheet table 3.10 lan9303/lan9303i 56-qfn package pin assignments pin num pin name pin num pin name pin num pin name pin num pin name 1 txn2 15 vdd33io 29 led0/ gpio0/ amdix1_led0p 43 txp1 2 p0_ind3 16 p0_outdv 30 vdd33io 44 vdd33a1 3 p0_ind2 17 p0_outclk 31 vdd18core 45 rxn1 4 p0_ind1 18 p0_col 32 vdd33io 46 rxp1 5 p0_ind0 19 p0_crs 33 test1 47 vdd33a1 6 p0_indv 20 p0_duplex 34 test2 48 vdd18tx1 7 p0_iner 21 mdio 35 ee_sda/ sda 49 exres 8 p0_inclk 22 mdc 36 ee_scl/ scl 50 vdd33bias 9 vdd33io 23 vdd33io 37 nrst 51 vdd18tx2 10 vdd18core 24 led5/ gpio5/ phyaddr_led5p 38 irq 52 vdd33a2 11 p0_outd3/ duplex_pol_0 25 led4/ gpio4/ mngt1_led4p 39 xi 53 rxp2 12 p0_outd2/ p0_mode2 26 led3/ gpio3/ mngt0_led3p 40 xo 54 rxn2 13 p0_outd1/ p0_mode1 27 led2/ gpio2/ e2psize_led2p 41 vdd18pll 55 vdd33a2 14 p0_outd0/ p0_mode0 28 led1/ gpio1/ amdix2_led1p 42 txn1 56 txp2 exposed pad must be connected to vss downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 41 revision 1.5 (07-08-11) datasheet 3.3 buffer types table 3.11 buffer types buffer type description is schmitt-triggered input o8 output with 8ma sink and 8ma source od8 open-drain output with 8ma sink o12 output with 12ma sink and 12ma source od12 open-drain output with 12ma sink os12 open-source output with 12 ma source o16 output with 16ma sink and 16ma source pu 50ua (typical) internal pull-up. unless otherwis e noted in the pin description, internal pull- ups are always enabled. note: internal pull-up resistors prevent unconnected inputs from floating. do not rely on internal resistors to drive signals external to the device. when connected to a load that must be pulled high, an ex ternal resistor must be added. pd 50ua (typical) internal pull-down. unless ot herwise noted in the pin description, internal pull-downs are always enabled. note: internal pull-down resistors prevent unconnected inputs from floating. do not rely on internal resistors to drive signals ex ternal to the device. when connected to a load that must be pulled low, an external resistor must be added. ai analog input aio analog bi-directional iclk crystal oscillator input pin oclk crystal oscillator output pin p power pin downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 42 smsc lan9303/lan9303i datasheet chapter 4 clocking, resets, and power management 4.1 clocks the device includes a clock module which provides generation of all system clocks as required by the various sub-modules of the device. the device requi res a fixed-frequency 25mhz clock source for use by the internal clock oscillator and pll. this is ty pically provided by attaching a 25mhz crystal to the xi and xo pins as specified in section 14.6, "clock circuit," on page 369 . optionally, this clock can be provided by driving the xi input pin with a single-ended 25mhz clock source. if a single-ended source is selected, the clock input must run conti nuously for normal device operation. the internal pll generates a fixed 200mhz base clock which is used to derive all sub-system clocks. in addition to the sub-system clocks, the clock mo dule is also responsible for generating the clocks used for the general purpose timer and free-running clock. refer to chapter 11, "general purpose timer & free-running clock," on page 134 for additional details. note: crystal specifications are provided in table 14.20, crystal specifications, on page 369 . 4.2 resets the device provides multiple hardware and software reset sources, which allow varying levels of the chip to be reset. all resets can be categorized into three reset types as described in the following sections: ? chip-level resets power-on reset (por) nrst pin reset ? multi-module resets digital reset (digital_rst) ? single-module resets port 2 phy reset port 1 phy reset virtual phy reset the device supports the use of configuration straps to allow automatic custom configurations of various parameters. these configuration strap values are set upon de-assertion of all chip-level resets and can be used to easily set the default parameters of th e chip at power-on or pin (nrst) reset. refer to section 4.2.4, "configur ation straps," on page 46 for detailed information on the usage of these straps. note: the eeprom loader is run upon a power-on reset, nrst pin reset, and digital reset. refer to section 8.4, "eeprom loader," on page 115 for additional information. table 4.1 summarizes the effect of the various reset sources on the device. refer to the following sections for detailed information on each of these reset types. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 43 revision 1.5 (07-08-11) datasheet 4.2.1 chip-level resets a chip-level reset event activates all internal resets , effectively resetting the entire device. configuration straps are latched, and the eeprom loader is run as a result of chip-level resets. a chip-level reset is initiated by assertion of any of the following input events: ? power-on reset (por) ? nrst pin reset chip-level reset/configuration comple tion can be determined by first polling the byte order test register (byte_test) . the returned data will be invalid until the serial interface resets are complete. once the returned data is the correct byte ordering value, the serial interface resets have completed. the completion of the entire chip-level reset must then be determined by polling the device ready (ready) bit of the hardware configuration register (hw_cfg) until it is set. when set, the device ready (ready) bit indicates that the reset has completed and the device is ready to be accessed. with the exception of the hardware configuration register (hw_cfg) , byte order test register (byte_test) , and reset control register (reset_ctl) , read access to any internal resources is forbidden while the device ready (ready) bit is cleared. writes to any address are invalid until the device ready (ready) bit is set. 4.2.1.1 power-on reset (por) a power-on reset occurs whenever power is initially applied to the device, or if the power is removed and reapplied to the device. this event resets all circuitry within the device. configuration straps are latched, and the eeprom loader is run as a result of this reset. a por reset typically takes approximately 23ms, plus an additional 91us per byte of data loaded from the eeprom via the eeprom loader. a full eeprom load of 64kb will complete in approximately 6.0 seconds. 4.2.1.2 nrst pin reset driving the nrst input pin low initiates a chip-level reset. this event resets all circuitry within the device. use of this reset input is optional, but when used, it must be driven for the period of time table 4.1 reset sources and affected device circuitry reset source systemclocks/reset sys interrupts switch fabric ethernet phys pmi i 2 c slave smi slaveeeprom controller gpio/led controller config. straps latched eeprom loader run por xxxxxxxxxxx nrst pin xxxxxxxxxxx digital reset xxx xxxxx x port 2 phy x port 1 phy x virtual phy x downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 44 smsc lan9303/lan9303i datasheet specified in section 14.5.2, "reset and configuration strap timing," on page 355 . configuration straps are latched, and the eeprom loader is run as a result of this reset. a nrst pin reset typically takes approximately 760us, plus an additional 91us per byte of data loaded from the eeprom via the eeprom loader. a fu ll eeprom load of 64kb will complete in approximately 6.0 seconds. note: the nrst pin is pulled-high internally. if un used, this signal can be left unconnected. do not rely on internal pull-up resistors to drive signals external to the device. please refer to section table 3.7, "miscellaneous pins," on page 38 for a description of the nrst pin. 4.2.2 multi-module resets multi-module resets activa te multiple internal rese ts, but do not reset the entire chip. configuration straps are not latched upon multi-module rese ts. a multi-module reset is initiated by assertion of the following: ? digital reset (digital_rst) multi-module reset/configuration completi on can be determined by first polling the byte order test register (byte_test) . the returned data will be invalid until the serial interface resets are complete. once the returned data is the correct byte ordering value, the serial interface resets have completed. the completion of the entire chip-level reset must then be determined by polling the device ready (ready) bit of the hardware configuration register (hw_cfg) until it is set. when set, the device ready (ready) bit indicates that the reset has completed and the device is ready to be accessed. with the exception of the hardware configuration register (hw_cfg) , byte order test register (byte_test) , and reset control register (reset_ctl) , read access to any internal resources is forbidden while the device ready (ready) bit is cleared. writes to any address are invalid until the device ready (ready) bit is set. note: the digital reset does not reset register bits designated as nasr. 4.2.2.1 digital reset (digital_rst) a digital reset is performed by setting the digital reset (digital_rst) bit of the reset control register (reset_ctl) . a digital reset will reset all sub-modu les except the ethe rnet phys (port 1 phy, port 2 phy, and virtual phy). the eeprom loa der will automatically r un following this reset. configuration straps are not latched as a result of a digital reset. a digital reset typically takes approximately 760us, plus an additional 91us per byte of data loaded from the eeprom via the eeprom loader. a fu ll eeprom load of 64kb will complete in approximately 6.0 seconds. 4.2.3 single-module resets a single-module reset will reset only the specified module. single-module resets do not latch the configuration straps or initiate the eeprom loader. a single-module reset is initiated by assertion of the following: ? port 2 phy reset ? port 1 phy reset ? virtual phy reset 4.2.3.1 port 2 phy reset a port 2 phy reset is performed by setting the port 2 phy reset (phy2_rst) bit of the reset control register (reset_ctl) or the reset (phy_rst) bit in the (x=2) port x phy basic control register (phy_basic_control_x) . upon completion of the port 2 phy reset, the port 2 phy reset downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 45 revision 1.5 (07-08-11) datasheet (phy2_rst) and reset (phy_rst) bits are automatically cleared. no other modules of the device are affected by this reset. in addition to the methods above, the port 2 phy is automatically reset after returning from a phy power-down mode. this reset differs in that the ph y power-down mode reset does not reload or reset any of the phy registers. refer to section 7.2.9, "phy power-down modes," on page 103 for additional information. port 2 phy reset completion can be determined by polling the port 2 phy reset (phy2_rst) bit in the reset control register (reset_ctl) or the reset (phy_rst) bit in the (x=2) port x phy basic control register (p hy_basic_control_x) until it clears. under normal conditions, these bits will clear approximately 110us after the port 2 phy reset occurrence. note: when using the reset (phy_rst) bit to reset the port 2 phy, register bits designated as nasr are not reset. refer to section 7.2.10, "phy resets," on page 103 for additional information on port 2 phy resets. 4.2.3.2 port 1 phy reset a port 1 phy reset is performed by setting the port 1 phy reset (phy1_rst) bit of the reset control register (reset_ctl) or the reset (phy_rst) bit in the (x=1) port x phy basic control register (phy_basic_control_x) . upon completion of the port 1 phy reset, the port 1 phy reset (phy1_rst) and reset (phy_rst) bits are automatically cleared. no other modules of the device are affected by this reset. in addition to the methods above, the port 1 phy is automatically reset after returning from a phy power-down mode. this reset differs in that the ph y power-down mode reset does not reload or reset any of the phy registers. refer to section 7.2.9, "phy power-down modes," on page 103 for additional information. port 1 phy reset completion can be determined by polling the port 1 phy reset (phy1_rst) bit in the reset control register (reset_ctl) or the reset (phy_rst) bit in the (x=1) port x phy basic control register (p hy_basic_control_x) until it clears. under normal conditions, these bits will clear approximately 110us after the port 1 phy reset occurrence. note: when using the reset (phy_rst) bit to reset the port 1 phy, register bits designated as nasr are not reset. refer to section 7.2.10, "phy resets," on page 103 for additional information on port 1 phy resets. 4.2.3.3 virtual phy reset a virtual phy reset is pe rformed by setting the virtual phy reset (vphy_rst) bit of the reset control register (reset_ctl) or reset (vphy_rst) in the virtual phy basic control register (vphy_basic_ctrl) . no other modules of the devi ce are affected by this reset. virtual phy reset completion can be determined by polling the virtual phy reset (vphy_rst) bit in the reset control regi ster (reset_ctl) or the reset (vphy_rst) bit in the virtual phy basic control register (vphy_basic_ctrl) until it clears. under normal conditions, these bits will clear approximately 1us after the vi rtual phy reset occurrence. refer to section 7.3.3, "virtual phy resets," on page 107 for additional information on virtual phy resets. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 46 smsc lan9303/lan9303i datasheet 4.2.4 configuration straps configuration straps allow various features of the device to be automatically configured to user defined values. configuration straps can be organized into two main categories: hard-straps and soft-straps. both hard-straps and soft-straps are latched upon power-on reset (por) or pin reset (nrst). the primary difference between these str ap types is that soft-strap default values can be overridden by the eeprom loader, while hard-straps cannot. configuration straps which have a corresponding exte rnal pin include internal resistors in order to prevent the signal from floating wh en unconnected. if a particular c onfiguration strap is connected to a load, an external pull-up or pull-down resistor sh ould be used to augment the internal resistor to ensure that it reaches the required voltage level prior to latching. the internal resistor can also be overridden by the addition of an external resistor. note: the system designer must guarantee that co nfiguration strap pins meet the timing requirements specified in section 14.5.2, "reset and conf iguration strap timing," on page 355 . if configuration strap pins are not at the correct voltage level prior to being latched, the device may capture incorrect strap values. 4.2.4.1 soft-straps soft-strap values are latched on the release of po r or nrst and are overridden by values from the eeprom loader (when an eeprom is pr esent). these straps are used as direct configuration values or as defaults for cpu registers. some, but not all, soft-straps have an associated pin. those that do not have an associated pin have a tie off default va lue. all soft-strap values can be overridden by the eeprom loader. table 4.2 provides a list of all soft-straps and their associated pin or default value. straps which have an associated pin are also fully defined in chapter 3, "pin description and configuration," on page 23 . refer to section 8.4, "eeprom loader," on page 115 for information on the operation of the eeprom loader and the loading of strap values. the use of the term configures in the description section of table 4.2 means the register bit is loaded with the strap value, while the term affects means the value of the register bi t is determined by the strap value and some other condition(s). upon setting the digital reset (digital_rst) bit in the reset control regi ster (reset_ctl) or upon issuing a reload command via the eeprom command register (e2p_cmd) , these straps return to their original latched (non-overridden) values if an eeprom is no longer attached or has been erased. the associated pins are not re-sampled. (i.e . the value latched on the pin during the last por or nrst will be used, not the value on the pin durin g the digital reset or reload command issuance). if it is desired to re-latch the current configurat ion strap pin values, a por or nrst must be issued. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 47 revision 1.5 (07-08-11) datasheet table 4.2 soft-strap configuration strap definitions strap name description pin / default value led_en_strap[5:0] led enable straps: configures the default value for the led enable 5-0 (led_en[5:0]) bits of the led configuration register (led_cfg) . 1b led_fun_strap[1:0] led function straps: configures the def ault value for the led function 1-0 (led_fun[1:0]) bits of the led configuration register (led_cfg) . 00b auto_mdix_strap_1 port 1 auto-mdix enable strap: configures the default value of the amdix_en strap state port 1 bit of the hardware configuration register (hw_cfg) . this strap is also used in conjunction with manual_mdix_strap_1 to configure port 1 auto-mdix functionality when the auto-mdix control (amdixctrl) bit in the (x=1) port x phy special cont rol/status indication register (phy_specia l_control_stat_ind_x) indicates the strap settings should be used for auto-mdix configuration. refer to the respective register definition sections for additional information. amdix1_led0p note 4.1 manual_mdix_strap_1 port 1 manual mdix strap: configures mdi(0) or mdix(1) for port 1 when the auto_mdix_strap_1 is low and the auto- mdix control (amdixctrl) bit of the (x=1) port x phy special control/status indication register (phy_special_control_stat_ind_x) indicates the strap settings are to be used for auto-mdix configuration. 0b autoneg_strap_1 port 1 auto negotiation enable strap: configures the default value of the auto-negotiation (phy_an) enable bit of the (x=1) port x phy basic control register (phy_basic_control_x) . this strap also may affect the default value of the following register bits (x=1): ? speed select lsb (phy_speed_sel_lsb) and duplex mode (phy_duplex) bits of the port x phy basic control register (p hy_basic_control_x) ? 10base-t full duplex and 10base-t half duplex bits of the port x phy auto-negotiation advertisement register (phy_an_adv_x) ? phy mode (mode[2:0]) bits of the port x phy special modes register (phy_special_modes_x) refer to the respective register definition sections for additional information. 1b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 48 smsc lan9303/lan9303i datasheet speed_strap_1 port 1 speed select strap: this strap may affect the default value of the following register bits (x=1): ? speed select lsb (phy_speed_sel_lsb) bit of the port x phy basic control register (phy_basic_control_x) ? phy mode (mode[2:0]) bits of the port x phy special modes register (phy_special_modes_x) ? 10base-t full duplex and 10base-t half duplex bits of the port x phy auto-negotiation advertisement register (phy_an_adv_x) refer to the respective register definition sections for additional information. 1b duplex_strap_1 port 1 duplex select strap: this strap affects the default value of the following register bits (x=1): ? duplex mode (phy_duplex) bit of the port x phy basic control register (p hy_basic_control_x) ? phy mode (mode[2:0]) bits of the port x phy special modes register (phy_special_modes_x) ? 10base-t full duplex bit of the port x phy auto- negotiation advertisement register (phy_an_adv_x) refer to the respective register definition sections for additional information. 1b bp_en_strap_1 port 1 backpressure enable strap: configures the default value for the port 1 backpressure enable (bp_en_1) bit of the port 1 manual flow control register (manual_fc_1) . 1b fd_fc_strap_1 port 1 full-duplex flow control enable strap: this strap is used to configure the default value of the following register bits (x=1): ? port 1 full-duplex transmit flow control enable (tx_fc_1) and port 1 full-duplex receive flow control enable (rx_fc_1) bits of the port 1 manual flow control register (manual_fc_1) this strap may affect the default value of the following register bits (x=1): ? asymmetric pause bit of the port x phy auto-negotiation advertisement register (phy_an_adv_x) refer to the respective register definition sections for additional information. 1b table 4.2 soft-strap configuration strap definitions (continued) strap name description pin / default value downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 49 revision 1.5 (07-08-11) datasheet manual_fc_strap_1 port 1 manual flow control enable strap: configures the default value of the port 1 full-duplex manual flow control select (manual_fc_1) bit in the port 1 manual flow control register (manual_fc_1) . this strap affects the default va lue of the following register bits (x=1): ? asymmetric pause and symmetric pause bits of the port x phy auto-negotiation advertisement register (phy_an_adv_x) 0b auto_mdix_strap_2 port 2 auto-mdix enable strap: configures the default value of the amdix_en strap state port 2 bit of the hardware configuration register (hw_cfg) . this strap is used in conjunction with manual_mdix_strap_2 to configure port 2 auto-mdix functionality when the auto- mdix control (amdixctrl) bit in the (x=2) port x phy special control/status indication register (phy_special_control_stat_ind_x) indicates the strap settings should be used for auto-mdix configuration. refer to the respective register definition sections for additional information. a m dix 2 led1p note 4.1 manual_mdix_strap_2 port 2 manual mdix strap: configures mdi(0) or mdix(1) for port 2 when the auto_mdix_strap_2 is low and the auto- mdix control (amdixctrl) bit of the (x=2) port x phy special control/status indication register (phy_special_control_stat_ind_x) indicates the strap settings are to be used for auto-mdix configuration. 0b autoneg_strap_2 port 2 auto negotiation enable strap: configures the default value of the auto-negotiation (phy_an) enable bit in the (x=2) port x phy basic control register (phy_basic_control_x) . this strap may also affect t he default value of the following register bits (x=2): ? speed select lsb (phy_speed_sel_lsb) and duplex mode (phy_duplex) bits of the port x phy basic control register (p hy_basic_control_x) ? 10base-t full duplex and 10base-t half duplex bits of the port x phy auto-negotiation advertisement register (phy_an_adv_x) ? phy mode (mode[2:0]) bits of the port x phy special modes register (phy_special_modes_x) refer to the respective register definition sections for additional information. 1b table 4.2 soft-strap configuration strap definitions (continued) strap name description pin / default value downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 50 smsc lan9303/lan9303i datasheet speed_strap_2 port 2 speed select strap: this strap affects the default value of the following register bits (x=2): ? speed select lsb (phy_speed_sel_lsb) bit of the port x phy basic control register (phy_basic_control_x) ? 10base-t full duplex bit and 10base-t half duplex bit of the port x phy auto-negotiation advertisement register (phy_an_adv_x) ? phy mode (mode[2:0]) bits of the port x phy special modes register (phy_special_modes_x) refer to the respective register definition sections for additional information. 1b duplex_strap_2 port 2 duplex select strap: this strap affects the default value of the following register bits (x=2): ? duplex mode (phy_duplex) bit of the port x phy basic control register (p hy_basic_control_x) ? 10base-t full duplex bit of the port x phy auto- negotiation advertisement register (phy_an_adv_x) ? phy mode (mode[2:0]) bits of the port x phy special modes register (phy_special_modes_x) refer to the respective register definition sections for additional information. 1b bp_en_strap_2 port 2 backpressure enable strap: configures the default value for the port 2 backpressure enable (bp_en_2) bit of the port 2 manual flow control register (manual_fc_2) . 1b fd_fc_strap_2 port 2 full-duplex flow control enable strap: this strap is used to configure the default value of the following register bits: ? port 2 full-duplex transmit flow control enable (tx_fc_2) and port 2 full-duplex receive flow control enable (rx_fc_2) bits of the port 2 manual flow control register (manual_fc_2) . this strap may affect the default value of the following register bits (x=2): ? asymmetric pause bit of the port x phy auto-negotiation advertisement register (phy_an_adv_x) refer to the respective register definition sections for additional information. 1b table 4.2 soft-strap configuration strap definitions (continued) strap name description pin / default value downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 51 revision 1.5 (07-08-11) datasheet manual_fc_strap_2 port 2 manual flow control enable strap: configures the default value of the port 2 full-duplex manual flow control select (manual_fc_2) bit in the port 2 manual flow control register (manual_fc_2) . this strap affects the default va lue of the following register bits (x=2): ? asymmetric pause and symmetric pause bits of the port x phy auto-negotiation advertisement register (phy_an_adv_x) . 0b speed_strap_0 port 0 (external mii) speed select strap: this strap affects the default value of the following bits in the virtual phy auto-negotiation link partner base page ability register (vphy_an_lp_base_ability) : ? 100base-x full duplex ? 100base-x half duplex ? 10base-t full duplex ? 10base-t half duplex refer to section 13.2.6.6 and table 13.7 for more information. this strap also configures the speed for port 0 when virtual auto-negotiation fails. refer to section 7.3.1.1, "parallel detection," on page 106 for additional information. 1b duplex_pol_strap_0 port 0 (external mii) duplex polarity strap: this strap determines the polarity of the p0_duplex pin in mii mac mode and affects the default value of the following bits in the virtual phy auto-negotiation link partner base page ability register (vphy_an_lp_base_ability) : ? 100base-x full duplex ? 100base-x half duplex ? 10base-t full duplex ? 10base-t half duplex refer to section 13.2.6.6 and table 13.7 for more information. duplex_pol_ 0 bp_en_strap_0 port 0 (external mii) backpressure enable strap: configures the default value of the port 0 backpressure enable (bp_en_0) bit of the port 0 manual flow control register (manual_fc_0) . 1b fd_fc_strap_0 port 0 (external mii) full-d uplex flow control enable strap : configures the def ault value of the port 0 transmit flow control enable (tx_fc_0) and port 0 receive flow control enable (rx_fc_0) bits in the port 0 manual flow control register (manual_fc_0) . this strap affects the default va lue of the following register bits: ? asymmetric pause and pause bits of the virtual phy auto-negotiation link partner base page ability register (vphy_an_lp_base_ability) 1b table 4.2 soft-strap configuration strap definitions (continued) strap name description pin / default value downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 52 smsc lan9303/lan9303i datasheet 4.2.4.2 hard-straps hard-straps are latched upon power-on reset (por) or pin reset (nrst) only. unlike soft-straps, hard-straps always have an associated pin and cannot be overridden by the eeprom loader. these straps are used as either direct configuration values or as register defaults. table 4.3 provides a list of all hard-straps and their associated pins. these straps, along with their pin assignments are also defined in chapter 3, "pin description and configuration," on page 23 . manual_fc_strap_0 port 0 (external mii) manual flow control enable strap: this strap affects the default va lue of the following register bits: ? port 0 full-duplex manual flow control select (manual_fc_0) bit in the port 0 manual flow control register (manual_fc_0) ? asymmetric pause and symmetric pause bits of the virtual phy auto-negotiation advertisement register (vphy_an_adv) refer to the respective register definition sections for additional information. note: in mac mode, this strap is not used. in this mode, the virtual phy is not applicable, and full-duplex flow control must be c ontrolled manually by the host, based upon the external phys auto- negotiation results. 0b sqe_test_disable_strap_0 sqe heartbeat disable strap: configures the default value of the sqeoff bit of the virtual phy special control/status register (vphy_special_control_status) when in mii phy mode. it is not used in rmii phy or mii mac modes. 0b table 4.3 hard-strap configuration strap definitions strap name description pin(s) mngt_mode_strap[1:0] serial management mode strap: configures the default serial management mode. 00 = reserved 01 = smi managed mode 10 = i 2 c managed mode 11 = reserved refer to section 2.3, "modes of operation," on page 19 for additional information on the various modes of the device. mngt1_led4p : mngt0_led3p note 4.1 eeprom_size_strap eeprom size strap: configures the eeprom size range as specified in section 8.3, "i2c master eeprom controller," on page 109 . e2psize_led2p note 4.1 table 4.2 soft-strap configuration strap definitions (continued) strap name description pin / default value downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 53 revision 1.5 (07-08-11) datasheet note 4.1 this pin has shared strap functionality. refer to ta b l e 4 . 4 for details. p0_mode_strap[1:0] port 0 mode strap: configures the default mode of operation for port 0. 00 = mii mac mode 01 = mii phy mode 10 = rmii phy mode 11 = reserved these operating modes result from the following mapping: refer to section 2.3, "modes of operation," on page 19 for additional information on the various modes of the device. p0_mode2 : p0_mode1 : p0_mode0 p0_rmii_clock_dir_strap port 0 rmii clock direction strap: configures the default value of the rmii clock direction bit of the virtual phy special control/status register (vphy_special_control_status) . note: the value of this strap is the inverse of the p0_mode1 pin. p0_mode1 p0_clock_strength_strap port 0 clock strength strap: configures the default value of the rmii/turbo mii clock strength bit of the virtual phy special control/status register (vphy_special_control_status) . p0_mode0 turbo_mii_enable_strap_0 port 0 turbo mii enable strap: configures the default value of the turbo mii enable bit of the virtual phy special control/status register (vphy_special_control_status) when in mii phy mode. p0_mode1 phy_addr_sel_strap phy address select strap: configures the default mii management address values for the phys and virtual phy as detailed in section 7.1.1, "phy addressing," on page 90 . phyaddr_led5p note 4.1 led_pol_strap[5:0] led polarity strap: configures the default polarity for each of the leds when they are an open-drain or open- source output. 0 = the led is set as active high, since it is assumed that a led to ground is used as the pull-down. 1 = the led is set as active low, since it is assumed that a led to vdd is used as the pull-up. phyaddr_led5p : mngt1_led4p : mngt0_led3p : e2psize_led2p : amdix2_led1p : amdix1_led0p table 4.3 hard-strap configuration strap definitions (continued) strap name description pin(s) p0_mode[2:0] p0_mode_strap[1:0] 000 00 (mii mac) 001, 010, or 011 01 (mii phy) 100, 101, or 110 10 (rmii phy) 111 reserved downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 54 smsc lan9303/lan9303i datasheet 4.3 power management the port 1 and port 2 phys support several power management and wakeup features. 4.3.1 port 1 & 2 phy power management the port 1 & 2 phys provide independent gene ral power-down and energy-detect power-down modes which reduce phy power consumption. general power-down mode provides power savings by powering down the entire phy, except the phy management control interface. general power-down mode must be manually enabled and disabled as described in section 7.2.9.1, "p hy general power- down," on page 103 . in energy-detect power-down mode, the phy will re sume from power-down when energy is seen on the cable (typically from link pulses). if th e energyon interrupt (i nt7) of either phys port x phy interrupt mask register (phy_interrupt_mask_x) is unmasked, then the corresponding phy will generate an interrupt. these in terrupts are reflected in the interrupt status register (int_sts) port 2 phy interrupt event (phy_int2) for the port 2 phy, and port 1 phy interrupt event (phy_int1) for the port 1 phy. these interrupts can be used to tr igger the irq interrupt output pin, as described in section 5.2.2, "ethernet phy interrupts," on page 57 . refer to section 7.2.9.2, "p hy energy detect power-down," on page 103 for details on the operation and conf iguration of the phy energy-detect power-down mode. table 4.4 pin/shared strap mapping pin strap name 1 strap name 2 phyaddr_led5p phy_addr_sel_strap led_pol_strap[5] mngt1_led4p mngt_mode_strap[1] led_pol_strap[4] mngt0_led3p mngt_mode_strap[0] led_pol_strap[3] e2psize_led2p eeprom_size_strap led_pol_strap[2] amdix2_led1p auto_mdix_strap_2 led_pol_strap[1] amdix1_led0p auto_mdix_strap_1 led_pol_strap[0] downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 55 revision 1.5 (07-08-11) datasheet chapter 5 system interrupts 5.1 functional overview this chapter describes the system in terrupt structure. the device pr ovides a multi-ti er programmable interrupt structure which is controlled by the s ystem interrupt controller. the programmable system interrupts are generated internally by the various sub-modules and can be configured to generate a single external host interrupt via the irq interrupt output pin. the progra mmable nature of the host interrupt provides the user with the ability to optimize performance dependent upon the application requirements. the irq interrupt buffer type, polarity , and de-assertion interval are modifiable. the irq interrupt can be configured as an open-drain outp ut to facilitate the sharing of interrupts with other devices. all internal interrupts are maskable and capable of triggering the irq interrupt. 5.2 interrupt sources the device is capable of generating the following interrupt types: ? switch fabric interrupts (buffer manager, switch engine, and port 2,1,0 macs) ? ethernet phy interrupts (port 1,2 phys) ? gpio interrupts (gpio[5:0]) ? general purpose timer interrupt (gpt) ? software interrupt (general purpose) ? device ready interrupt all interrupts are accessed and configured via registers arranged into a multi-tier, branch-like structure, as shown in figure 5.1 . at the top level of the interrupt structure are the interrupt status register (int_sts) , interrupt enable register (int_en) , and interrupt configuration register (irq_cfg) . the interrupt status register (int_sts) and interrupt enable register (int_en) aggregate and enable/disable all interrupts from the various sub-mo dules, combining them to gether to create the irq interrupt. these registers provide direct interrupt access/configuration to th e general purpose timer, software, and device ready interrupts. these interrupts can be monitored, enabled/disabled, and cleared, directly within these two r egisters. in addition, interrupt event indications are provided for the switch fabric, port 1 & 2 ethernet phys, and gpio interrupts. these interrupts differ in that the interrupt sources are generated and clear ed in other sub-block registers. the interrupt status register (int_sts) does not provide details on what specific ev ent within the sub-module caused the interrupt, and requires the software to poll an additional sub-module interrupt register (as shown in figure 5.1 ) to determine the exact interrupt source and clear it. for interrupts which involve multiple registers, only after the interrupt has been serviced and clear ed at its source will it be cleared in the interrupt status register (int_sts) . the interrupt configuration register (irq_cfg) is responsible for enabling/disabling the irq interrupt output pin as well as configuring its properties. this register allows the modification of the irq pin buffer type, polarity, and de-assertion interval. the de-assertion timer guarantees a minimum interrupt de-assertion period for the irq output and is programmable via the interrupt de-ass ertion interval (int_deas) field of the interrupt configuration register (irq_cfg) . a setting of all zeros disables the de-assertion timer. the de-assertion interval star ts when the irq pin de-asserts, regardless of the reason. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 56 smsc lan9303/lan9303i datasheet the following sections detail each category of interrupts and their related registers. refer to chapter 13, "register descriptions," on page 139 for bit-level definitions of all interrupt registers. figure 5.1 functional interrupt register hierarchy int_cfg int_sts int_en top level interrupt registers (system csrs) phy_interrupt_source_2 phy_interrupt_mask_2 port 2 phy interrupt registers phy_int2 bit of int_sts register phy_interrupt_source_1 phy_interrupt_mask_1 port 1 phy interrupt registers phy_int1 bit of int_sts register sw_imr sw_ipr switch fabric interrupt registers switch_int bit of int_sts register bm_imr bm_ipr buffer manager interrupt registers bm bit of sw_ipr register swe_imr swe_ipr switch engine interrupt registers swe bit of sw_ipr register mac_imr_[2,1,0] mac_ipr_[2,1,0] port [2,1,0] mac interrupt registers mac_[2,1,0] bits of sw_ipr register gpio_int_sts_en gpio interrupt register gpio bit of int_sts register downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 57 revision 1.5 (07-08-11) datasheet 5.2.1 switch fabric interrupts multiple switch fabric interrupt sources are provided in a three-tiered register structure as shown in figure 5.1 . the top-level switch fabric interrupt event (switch_int) bit of the interrupt status register (int_sts) provides indication that a switch fa bric interrupt event occurred in the switch global interrupt pending register (sw_ipr) . the switch engine interrupt pending register (swe_ipr) and switch engine interrupt mask register (swe_imr) provide status and enabling/disabling of all switch fabric sub-modules interrupts (buffer manager, switch engine, and port 2,1,0 macs). the low-level switch fabric sub-module interrupt pending and mask registers of the buffer manager, switch engine, and port 2,1,0 macs provide multiple interrupt sources from their respective sub- modules. these low-level registers provide the following interrupt sources: ? buffer manager ( buffer manager interrupt mask register (bm_imr) and buffer manager interrupt pending register (bm_ipr) ) status b pending status a pending ? switch engine ( switch engine interrupt mask register (swe_imr) and switch engine interrupt pending register (swe_ipr) ) interrupt pending ? port 2,1,0 macs ( port x mac interrupt mask register (mac_imr_x) and port x mac interrupt pending register (mac_ipr_x) ) no currently supported interrupt sources. t hese registers are reserved for future use. in order for a switch fabric interrupt event to tri gger the external irq interr upt pin, the following must be configured: ? the desired switch fabric sub-module interrupt event must be enabled in the corresponding mask register ( buffer manager interrupt mask register (bm_imr) for the buffer manager, switch engine interrupt mask register (swe_imr) for the switch engine, and/or port x mac interrupt mask register (mac_imr_x) for the port 2,1,0 macs) ? the desired switch fabric sub-module interrupt event must be enabled in the switch global interrupt mask register (sw_imr) ? switch fabric interrupt event enable (switch_int_en) bit of the interrupt enable register (int_en) must be set ? irq output must be enabled via the irq enable (irq_en) bit of the interrupt configuration register (irq_cfg) for additional details on the switch fabric interrupts, refer to section 6.6, "switch fabric interrupts," on page 89 . 5.2.2 ethernet phy interrupts the port 1 and port 2 phys each provide a set of identical interrupt sources. the top-level port 1 phy interrupt event (phy_int1) and port 2 phy interrupt event (phy_int2) bits of the interrupt status register (int_sts) provide indication that a phy interrupt event occurred in the respective port x phy interrupt source flags regist er (phy_interrupt_source_x) . port 1 and port 2 phy interrupts are enabled/disabled via their respective port x phy interrupt mask register (phy_interrupt_mask_x) . the source of a phy interrupt can be determined and cleared via the port x phy interrupt source flag s register (phy_interrupt_source_x) . the port 1 and port 2 phys are each capable of generating unique interrupts based on the following events: ? energyon activated ? auto-negotiation complete ? remote fault detected downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 58 smsc lan9303/lan9303i datasheet ? link down (link status negated) ? auto-negotiation lp acknowledge ? parallel detection fault ? auto-negotiation page received in order for a port 1 or port 2 interrupt event to tr igger the external irq inte rrupt pin, the desired phy interrupt event must be enabled in the corresponding port x phy interrupt mask register (phy_interrupt_mask_x) , the port 1 phy interrupt event (phy_int1) and/or port 2 phy interrupt event (phy_int2) bits of the interrupt enable register (int_en) must be set, and irq output must be enabled via the irq enable (irq_en) bit of the interrupt configurati on register (irq_cfg) . for additional details on the ethernet phy interrupts, refer to section 7.2.8.1, "phy interrupts," on page 102 . 5.2.3 gpio interrupts each gpio[5:0] is provided with its own interrupt. the top-level gpio interrupt event (gpio) bit of the interrupt status register (int_sts) provides indication that a gpio interrupt event occurred in the general purpose i/o interrupt status and enable register (gpio_int_sts_en) . the general purpose i/o interrupt status and e nable register (gpio_int_sts_en) provides enabling/disabling and status of each gpio[5:0] interrupt. in order for a gpio interrupt event to trigger the ex ternal irq interrupt pin, the desired gpio interrupt must be enabled in the general purpose i/o interrupt status and enable register (gpio_int_sts_en) , the gpio interrupt event enable (gpio_en) bit of the interrupt enable register (int_en) must be set, and irq output must be enabled via the irq enable (irq_en) bit of the interrupt configuration register (irq_cfg) . for additional details on the gpio interrupts, refer to section 12.2.1, "gpio interrupts," on page 135 . 5.2.4 general purpose timer interrupt a gp timer (gpt_int) interrupt is provided in the top-level interrupt status register (int_sts) and interrupt enable register (int_en) . this interrupt is issued when the general purpose timer configuration register (gpt_cfg) wraps past zero to ffffh, and is cleared when the gp timer (gpt_int) bit of the interrupt status register (int_sts) is written with 1. in order for a general purpose timer interrupt event to trigger the external irq interrupt pin, the gpt must be enabled via the general purpose timer enable (timer_en) bit of the general purpose timer configuration register (gpt_cfg) , the gp timer interrupt enable (gpt_int_en) bit of the interrupt enable register (int_en) must be set, and irq ou tput must be enabled via the irq enable (irq_en) bit of the interrupt configuration register (irq_cfg) . for additional details on the general purpose timer, refer to section 11.1, "general purpose timer," on page 134 . 5.2.5 software interrupt a general purpose software interrupt is provided in the top level interrupt status register (int_sts) and interrupt enable register (int_en) . the software interrupt (sw_int) bit of the interrupt status register (int_sts) is generated when the software interrupt enable (sw_int_en) bit of the interrupt enable register (int_en) is set. this interrupt provides an easy way for software to generate an interrupt, and is designed for general software usage. 5.2.6 device ready interrupt a device ready interrupt is provided in the top-level interrupt status register (int_sts) and interrupt enable register (int_en) . the device ready (ready) bit of the interrupt status register (int_sts) indicates that the device is ready to be accessed after a power-up or reset condition. writing a 1 to this bit in the interrupt status register (int_sts) will clear it. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 59 revision 1.5 (07-08-11) datasheet in order for a device ready interrupt event to trigger the external irq interrupt pin, the device ready enable (ready_en) bit of the interrupt enable register (int_en) must be set, and irq output must be enabled via the irq enable (irq_en) bit of the interrupt configuration register (irq_cfg) . downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 60 smsc lan9303/lan9303i datasheet chapter 6 switch fabric 6.1 functional overview at the core of the device is the high performance, high efficiency 3 port ethernet switch fabric. the switch fabric contains a 3 port vlan layer 2 switch engine that supports untagged, vlan tagged, and priority tagged frames. the switch fabric provides an extensive feature set which includes spanning tree protocol support, multicast packe t filtering and quality of service (qos) packet prioritization by vlan tag, dest ination address, port default valu e or diffserv/tos, allowing for a range of prioritization implementations. 32k of buff er ram allows for the storage of multiple packets while forwarding operations are completed, and a 512 entry forwarding table provides room for mac address forwarding tables. each port is allocated a cluster of 4 dynamic qos queues which allow each queue size to grow and shrink with traffic, effectively utilizing all available memory. this memory is managed dynamically via the buffer manager block wit hin the switch fabric. all aspects of the switch fabric are managed via the switch fabric configurat ion and status registers (csr), which are indirectly accessible via the system cont rol and status registers. the switch fabric consists of four major block types: ? switch fabric csrs - these registers provide access to various switch fabric parameters for configuration and monitoring. ? 10/100 ethernet macs - a total of three macs are included in the switch fabric which provide basic 10/100 ethernet functionalit y for each switch fabric port. ? switch engine (swe) - this block is the core of the switch fabric and provides vlan layer 2 switching for all three switch ports. ? buffer manager (bm) - this block provides control of the free buffer space, transmit queues, and scheduling. refer to figure 2.1 internal block diagram on page 16 for details on the interconnection of the switch fabric blocks wit hin the device. 6.2 switch fabric csrs the switch fabric csrs provide regi ster level access to the various parameters of the switch fabric. switch fabric related registers can be classified in to two main categories based upon their method of access: direct and indirect. the directly accessible switch fabr ic registers are part of the ma in system csrs and are detailed in section 13.2.4, "switch fabric," on page 155 . these registers provide switch fabric manual flow control (ports 0-2), data/command r egisters (for access to the indire ct switch fabric registers), and switch mac address configuration. the indirectly accessible switch fabric registers re side within the switch fabric and must be accessed indirectly via the switch fabric csr interface data register (switch_csr_data) and switch fabric csr interface command register (switch_csr_cmd) , or the set of switch fabric csr interface direct data registers (switch_csr_direct_data) . the indirectly accessible switch fabric csrs provide full access to the many configurable parame ters of the switch engi ne, buffer manager, and each switch port. the switch fabric csrs are detailed in section 13.4, "switch fabric control and status registers," on page 215 . for detailed descriptions of all switch fabric related registers, refer to chapter 13, "register descriptions," on page 139 . downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 61 revision 1.5 (07-08-11) datasheet 6.2.1 switch fabric csr writes to perform a write to an individual switch fabric r egister, the desired data must first be written into the switch fabric csr interface data register (switch_csr_data) . the write cycle is initiated by performing a single write to the switch fabric csr interface command register (switch_csr_cmd) with the csr busy (csr_busy) bit set, the csr address (csr_addr[15:0]) field set to the desired register address, the read/write (r_nw) bit cleared, the auto increment (auto_inc) and auto decrement (auto_dec) fields cleared, and the desired csr byte enable (csr_be[3:0]) bits selected. the co mpletion of the write cycle is in dicated by the clearing of the csr busy (csr_busy) bit. a second write method may be used which utilizes the auto increment/decrement function of the switch fabric csr interface command register (switch_csr_cmd) for writing sequential register addresses. when using this method, the switch fabric csr in terface command register (switch_csr_cmd) must first be written with the auto increment (auto_inc) or auto decrement (auto_dec) bit set, the csr address (csr_addr[15:0]) field written with the desired register address, the read/write (r_nw) bit cleared, and the desired csr byte enable bits selected (typically all set). the write cycles are then initia ted by writing the desired data into the switch fabric csr interface data register (switch_csr_data) . the completion of the writ e cycle is indicated by the clearing of the csr busy (csr_busy) bit, at which time the address in the switch fabric csr interface command regi ster (switch_csr_cmd) is incremented or decremented accordingly. the user may then initiate a subsequent write cycle by writing the desired data into the switch fabric csr interface data register (switch_csr_data) . the third write method is to use the direct data range write function. writes within the switch fabric csr interface direct data registers (switch_csr_direct_data) address range automatically set the appropriate register address, set all four csr byte enable (csr_be[3:0]) bits, clears the read/write (r_nw) bit, and set the csr busy (csr_busy) bit of the switch fabric csr interface command register (switch_csr_cmd) . the completion of the write cycle is indicated by the clearing of the csr busy (csr_busy) bit. since the address range of the switch fabric csrs exceeds that of the switch fabric csr interf ace direct data registers (switch_csr_direct_data) address range, a sub-set of the switch fabric csrs are mapped to the switch fabric csr interface direct da ta registers (switch_csr_direct_data) address range as detailed in table 13.4, switch fabric csr to switch_csr_direct_data address range map, on page 167 . figure 6.1 illustrates the process required to perform a switch fabric csr write. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 62 smsc lan9303/lan9303i datasheet 6.2.2 switch fabric csr reads to perform a read of an individual switch fabric register, the read cycle must be initiated by performing a single write to the switch fabric csr interface co mmand register (switch_csr_cmd) with the csr busy (csr_busy) bit set, the csr address (csr_addr[15:0]) field set to the desired register address, the read/write (r_nw) bit set, and the auto increment (auto_inc) and auto decrement (auto_dec) fields cleared. valid data is available for reading when the csr busy (csr_busy) bit is cleared, indicating that t he data can be read from the switch fabric csr interface data register (switch_csr_data) . a second read method may be used which utilizes the auto increment/decrement function of the switch fabric csr interface command register (switch_csr_cmd) for reading sequential register addresses. when using this method, the switch fabric csr in terface command register (switch_csr_cmd) must first be written with the auto increment (auto_inc) or auto decrement (auto_dec) bit set, the csr address (csr_addr[15:0]) field written with the desired register address, and the read/write (r_nw) bit set. the completion of a read cycle is indicated by the clearing of the csr busy (csr_busy) bit, at which time the data can be read from the switch fabric csr interface data register (switch_csr_data) . when the data is read, the address in the switch fabric csr interface command register (switch_csr_cmd) is incremented or decremented accordingly, and another read cycle is started automatically. the user should clear the auto increment (auto_inc) and auto decrement (auto_dec) bits before reading the last data to avoid an unintended read cycle. figure 6.2 illustrates the process required to perform a switch fabric csr read. figure 6.1 switch fabric csr write access flow diagram idle write data register write command register read command register csr_busy = 0 csr write csr_busy = 1 idle write data register write command register read command register csr_busy = 0 csr write auto increment / decrement csr_busy = 1 idle write direct data register range read command register csr_busy = 0 csr write direct address csr_busy = 1 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 63 revision 1.5 (07-08-11) datasheet 6.2.3 flow control enable logic each switch fabric port (0,1,2) is provided with two flow control enable inputs per port, one for transmission and one for reception. flow control on transmission allows the transmitter to generate back pressure in half-duplex mode, and pause packets in full-duplex. flow control in reception enables the reception of pause packets to pause transmissions. the state of these enables is based on the state of the ports duplex and auto-negotiation settings and the values of the corresponding manual flow control register ( port 1 manual flow control register (manual_fc_1) , port 2 manual flow control register (manual_fc_2) , or port 0 manual flow control register (manual_fc_0) ). table 6.1 details the switch fabric flow control enable logic. when in half-duplex mode, the transmit flow contro l (back pressure) enable is determined directly by the bp_en_x bit of the ports manual flow control re gister. when auto-negotiation is disabled, or the manual_fc_x bit of the ports manual flow control regi ster is set, the switch port flow control enables during full-duplex are determined by the tx_fc_x and rx_fc_x bits of the port s manual flow control figure 6.2 switch fabric cs r read access flow diagram idle write command register read command register read data register csr_busy = 0 csr read csr_busy = 1 idle write command register read command register csr_busy = 0 csr read auto increment / decrement csr_busy = 1 write command register read data register last data? yes no read data register downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 64 smsc lan9303/lan9303i datasheet register. when auto-negotiation is enabled and the manual_fc_x bit is cleared, the switch port flow control enables during full-duplex are determined by auto-negotiation. note: the flow control values in the port x phy auto-negotiation advertisement register (phy_an_adv_x) and virtual phy auto-negotiation advertisement register (vphy_an_adv) are not affected by the values of the manual flow control register. refer to section 7.2.5.1, "phy pause flow control," on page 100 and section 7.3.1.3, "virtual phy pause flow control," on page 106 for additional information on phy and virtual phy flow control settings respectively. note 6.1 if auto-negotiation is enabled and complete, bu t the link partner is not auto-negotiation capable, half-duplex is forced via the parallel detect function. note 6.2 for the port 1 and port 2 phys, these are the bits from the port x phy auto-negotiation advertisement register (phy_an_adv_x) and port x phy auto-negotiation link partner base page ability register (phy_an_lp_base_ability_x) . for the virtual phy, these are the local/partner swapped ou tputs from the bits in the virtual phy auto-negotiation advertisement register (vphy_an_adv) and virtual phy auto-negotiation link partner base page ability register (vphy_an_lp_base_ability) . refer to section 7.3.1, "virtual phy auto-negotiation," on page 104 for more information. table 6.1 switch fabric flow control enable logic case manual_fc_x an enable an complete lp an able duplex an pause advertisement ( note 6.2 ) an asym pause advertisement ( note 6.2 ) lp pause ability ( note 6.2 ) lp asym pause ability ( note 6.2 ) rx flow control enable tx flow control enable -1x x xh a l f xxxx0 bp_en_x - x0x xh a l f xxxx0 bp_en_x -1x x xf u l l xxxx rx_fc_x tx_fc_x - x0x xf u l l xxxx rx_fc_x tx_fc_x 10 1 0 x x xxxx0 0 20 1 1 0h a l f ( note 6.1 ) xxxx0 bp_en_x 30 1 1 1h a l f xxxx0 bp_en_x 40 1 1 1f u l l 0 0 x x 0 0 50 1 1 1f u l l 0 1 0 x 0 0 60 1 1 1f u l l 011000 70 1 1 1f u l l 011101 80 1 1 1f u l l 1 0 0 x 0 0 90 1 1 1f u l l 1x1x11 10 0 1 1 1f u l l 110000 11 0 1 1 1f u l l 110110 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 65 revision 1.5 (07-08-11) datasheet per ta b l e 6 . 1 , the following cases are possible: ? case 1 - auto-negotiation is still in progress. since t he result is not yet established, flow control is disabled. ? case 2 - auto-negotiation is enabled and unsuccessfu l (link partner not auto-negotiation capable). the link partner ability is undefined, effectively a dont-care value, in this case. the duplex setting will default to half-duplex in this case. flow control is determined by the bp_en_x bit. ? case 3 - auto-negotiation is enabled and successful with half-duplex as a result. the link partner ability is undefined since it only applies to full-duple x operation. flow control is determined by the bp_en_x bit. ? cases 4-11 -auto-negotiation is enabled and successful with full-duplex as the result. in these cases, the advertisement registers and the link partner ability controls the rx and tx enables. these cases match ieee 802.3 annex 28b.3. ? cases 4,5,6,8,10 - no flow control enabled ? case 7 - asymmetric pause towards partner (away from switch port) ? case 9 - symmetric pause ? case 11 - asymmetric pause from partner (towards switch port) 6.3 10/100 ethernet macs the switch fabric contains thr ee 10/100 mac blocks, o ne for each switch port (0,1,2). the 10/100 mac provides the basic 10/100 ethernet functiona lity, including transmission deferral and collision back-off/retry, receive/transmit fcs checking and gener ation, receive/transmit pause flow control, and transmit back pressure. the 10/100 mac also includes rx and tx fifos and per port statistic counters. 6.3.1 receive mac the receive mac (ieee 802.3) sublayer decomposes ethernet pa ckets acquired via the internal mii interface by stripping off the preamble sequence and start of frame delimiter (sfd). the receive mac checks the fcs, the mac control type, and the by te count against the drop conditions. the packet is stored in the rx fifo as it is received. the receive mac determines the validity of each rece ived packet by checking the type field, fcs, and oversize or undersize conditions. all bad packets will be either immediately dropped or marked (at the end) as bad packets. oversized packets are normally truncated at 1519 or 1523 (vlan tagged) octets and marked as erroneous. the mac can be configured to accept packets up to 2048 octets (inclusive), in which case the oversize packets are truncated at 2048 bytes and marked as erroneous. undersized packets are defined as packets with a length less than the minimum packet size. the minimum packet size is defined to be 64 by tes, exclusive of pr eamble sequence and sfd. the fcs and length/type fields of the frame are ch ecked to detect if the packet has a valid mac control frame. when the mac receives a mac c ontrol frame with a valid fcs and determines the operation code is a pause command (flow control fram e), the mac will load its internal pause counter with the number_of_slots variable from the mac c ontrol frame just receiv ed. anytime the internal pause counter is zero, the transmit mac will be allowe d to transmit (xon). if the internal pause counter is not zero, the receive mac will not allow the tr ansmit mac to transmit (xoff). when the transmit mac detects an xoff condition it will continue to transmit the current packet, terminating transmission after the current packet has been tr ansmitted until receiving the xo n condition from the receive mac. the pause counter will begin to decrement at then end of the current transmission, or immediately if downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 66 smsc lan9303/lan9303i datasheet no transmission is underway. if another pause command is received while the transmitter is already in pause, the new pause time indicated by the flow control packet will be loaded into the pause counter. the pause function is enabled by either au to-negotiation, or manually as discussed in section 6.2.3, "flow control enable logic," on page 63 . pause frames are consumed by the mac and are not sent to the switch engine. non-pause control fr ames are optionally filtered or forwarded. when the receive fifo is full and additional data c ontinues to be received, an overrun condition occurs and the frame is discarded (fifo space recovered) or marked as a bad frame. the receive mac can be disabled from receiving all frames by clearing the rx enable bit of the port x mac receive configuration register (mac_rx_cfg_x) . the size of the rx fifo is 256 bytes. if a bad pa cket with less than 64 bytes is received, it will be flushed from the fifo aut omatically and the fifo space recovered. packets equal to or larger than 64 bytes with an error will be marked and reported to the switch engine. the switch engine will subsequently drop the packet. 6.3.1.1 receive counters the receive mac gathers statistics on each packet an d increments the related counter registers. the following receive counters are supported for each switch fabric port. refer to table 13.14, indirectly accessible switch control and status registers, on page 215 and section 13.4.2.3 through section 13.4.2.22 for detailed descriptions of these counters. ? total undersized packets ( section 13.4.2.3, on page 232 ) ? total packets 64 bytes in size ( section 13.4.2.4, on page 233 ) ? total packets 65 through 127 bytes in size ( section 13.4.2.5, on page 234 ) ? total packets 128 through 255 bytes in size ( section 13.4.2.6, on page 235 ) ? total packets 256 through 511 bytes in size ( section 13.4.2.7, on page 236 ) ? total packets 512 through 1023 bytes in size ( section 13.4.2.8, on page 237 ) ? total packets 1024 through maximum bytes in size ( section 13.4.2.9, on page 238 ) ? total oversized packets ( section 13.4.2.10, on page 239 ) ? total ok packets ( section 13.4.2.11, on page 240 ) ? total packets with crc errors ( section 13.4.2.12, on page 241 ) ? total multicast packets ( section 13.4.2.13, on page 242 ) ? total broadcast packets ( section 13.4.2.14, on page 243 ) ? total mac pause packets ( section 13.4.2.15, on page 244 ) ? total fragment packets ( section 13.4.2.16, on page 245 ) ? total jabber packets ( section 13.4.2.17, on page 246 ) ? total alignment errors ( section 13.4.2.18, on page 247 ) ? total bytes received from all packets ( section 13.4.2.19, on page 248 ) ? total bytes received from good packets ( section 13.4.2.20, on page 249 ) ? total packets with a symbol error ( section 13.4.2.21, on page 250 ) ? total mac control packets ( section 13.4.2.22, on page 251 ) downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 67 revision 1.5 (07-08-11) datasheet 6.3.2 transmit mac the transmit mac generates an etherne t mac frame from tx fifo data. this includes generating the preamble and sfd, calculating and appending the frame checksum value, optionally padding undersize packets to meet the minimum packet requirement size (64 bytes), and maintaining a standard inter-frame gap time during transmit. the transmit mac can operate at 10/100mbps, half- or full-duplex, and with or without flow control depending on the state of the transmission. in half-duplex mode, the tr ansmit mac meets csma/cd ieee 802.3 requirements. the transmit mac will re-transmit if collisions occur during the first 64 bytes (normal collisions), or will discard the packet if collisions occur after the first 64 bytes (late collisions). the transmit mac follows the standard truncated bina ry exponential back-off algorithm, collision and jamming procedures. the transmit mac pre-pends the standard preamble and sfd to every packet from the fifo. the transmit mac also follows, as defaul t, the standard inter-frame gap (i fg). the default ifg is 96 bit times and can be adjusted via the ifg config field of the port x mac transmit configuration register (mac_tx_cfg_x) . packet padding and cyclic redundant code (fcs) ca lculation may be optionally performed by the transmit mac. the auto-padding pr ocess automatically adds enough zeros to packets shorter than 64 bytes. the auto-padding and fcs generation is controlled via the tx pad enable bit of the port x mac transmit configuration register (mac_tx_cfg_x) . the transmit fifo acts as a temporary buffer between the transmit mac and the switch engine. the fifo logic manages the re-transmission for normal collision conditions or discards the frames for late or excessive collisions. when in full-duplex mode, the transmit mac uses t he flow-control algorithm specified in ieee 802.3. mac pause frames are used primarily for flow c ontrol packets, which pass signalling information between stations. mac pause frames have a uniq ue type of 8808h, and a pause op-code of 0001h. the mac pause frame contains the pause value in t he data field. the flow control manager will auto- adapt the procedure based on traffic volume and speed to avoid packet loss and unnecessary pause periods. when in half-duplex mode, the mac uses a back pre ssure algorithm. the back pressure algorithm is based on a forced collision and an aggressive back-off algorithm. 6.3.2.1 transmit counters the transmit mac gathers statistics on each packet and increments the related counter registers. the following transmit counters are supported for each switch fabric port. refer to table 13.14, indirectly accessible switch control and status registers, on page 215 and section 13.4.2.25 through section 13.4.2.42 for detailed descriptions of these counters. ? total packets deferred ( section 13.4.2.25, on page 254 ) ? total pause packets ( section 13.4.2.26, on page 255 ) ? total ok packets ( section 13.4.2.27, on page 256 ) ? total packets 64 bytes in size ( section 13.4.2.28, on page 257 ) ? total packets 65 through 127 bytes in size ( section 13.4.2.29, on page 258 ) ? total packets 128 through 255 bytes in size ( section 13.4.2.30, on page 259 ) ? total packets 256 through 511 bytes in size ( section 13.4.2.31, on page 260 ) ? total packets 512 through 1023 bytes in size ( section 13.4.2.32, on page 261 ) ? total packets 1024 through maximum bytes in size ( section 13.4.2.33, on page 262 ) ? total undersized packets ( section 13.4.2.34, on page 263 ) ? total bytes transmitted from all packets ( section 13.4.2.35, on page 264 ) downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 68 smsc lan9303/lan9303i datasheet ? total broadcast packets ( section 13.4.2.36, on page 265 ) ? total multicast packets ( section 13.4.2.37, on page 266 ) ? total packets with a late collision ( section 13.4.2.38, on page 267 ) ? total packets with excessive collisions ( section 13.4.2.39, on page 268 ) ? total packets with a single collision ( section 13.4.2.40, on page 269 ) ? total packets with multiple collisions ( section 13.4.2.41, on page 270 ) ? total collision count ( section 13.4.2.42, on page 271 ) 6.4 switch engine (swe) the switch engine (swe) is a vlan layer 2 (link layer) switching engine supporting 3 ports. the swe supports the following types of frame formats: untagged frames, vlan tagged frames, and priority tagged frames. the swe supports both t he 802.3 and ethernet ii frame formats. the swe provides the control for all forwarding/filtering rules. it handles the address learning and aging, and the destination port resolution based upon the mac address and vlan of the packet. the swe implements the standard bridge port states for spanning tree and provides packet metering for input rate control. it also implements port mirroring, broadcast throttling, and multicast pruning and filtering. packet priorities are s upported based on the ipv4 tos bits and ipv6 traffic class bits using a diffserv table mapping, the non-diffserv map ped ipv4 precedence bits, vlan priority using a per port priority regeneration table, da based static priority, and traffic class mapping to one of 4 qos transmit priority queues. the following sections detail the vari ous features of the switch engine. 6.4.1 mac address lookup table the address logic resolution (alr) maintains a 512 entry mac address table. the alr searches the table for the destination mac address. if the s earch finds a match, the associated data is returned indicating the destination port or ports, whether to filter the packet, the packets priority (used if enabled), and whether to override the ingress and egress spanning tree port state. figure 6.3 displays the alr table entry structure. refer to the switch engine alr write data 0 register (swe_alr_wr_dat_0) and switch engine alr write data 1 register (swe_alr_wr_dat_1) for detailed descriptions of these bits. figure 6.3 alr table entry structure 57 age / override valid 58 static 56 filter 55 priority port 50 49 48 mac address 47 0 ... bit 53 52 51 54 priority enable downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 69 revision 1.5 (07-08-11) datasheet 6.4.1.1 learning/aging/migration the alr adds new mac addresses upon ingress along with the associated receive port. if the source mac address already exists, the entry is refreshed. this action serves two purposes. first, if the source port has changed due to a network reconfiguration (migration), it is updated. second, each instance the entry is refreshed, the ag ing status bit is set, keeping the entry active. learning can be disabled per port via the enable learning on ingress field of the switch engine port ingress configuration regist er (swe_port_ingrss_cfg) . during each aging period, the alr scans the le arned mac addresses. for entries which have the aging status bit set, the alr simply clears the bit. as mentioned above, if a mac address is subsequently refreshed, the aging bit will be set again and the process would repeat. if a learned entry already had its aging status bit cleared (by a previous scan), the alr will instead remove the learned entry. therefore, if two scans occur before a mac address is re freshed, the entry will be aged and removed. each aging period is approximately 5 mi nutes. therefore an entry will be aged and removed at a minimum of 5 minutes, and a maximum of 10 minutes. 6.4.1.2 static entries if a mac address entry is manually added by the host cpu, it can be (and typically is) marked as static. static entries are not subjected to the aging process. static entries also cannot be changed by the learning process (including migration). 6.4.1.3 multicast pruning the destination port that is returned as a result of a destination mac address lookup may be a single port or any combination of ports. the latter is used to setup multicast add ress groups. an entry with a multicast mac address would be entered manually by the host cpu with the appropriate destination port(s). typically, the static bit should also be set to prevent automatic aging of the entry. 6.4.1.4 address filtering filtering can be performed on a destination mac address. such an entry would be entered manually by the host cpu with the filter bit active. typically, the static bit should also be set to prevent automatic aging of the entry. 6.4.1.5 spanning tree port state override a special spanning tree port state override setting can be applied to mac address entries. when the host cpu manually adds an entry with both the static and age bits set, packets with a matching destination address will bypass the spanning tree por t state (except the disabled state) and will be forwarded. this feature is typically used to allo w the reception of the bpdu packets while a port is in the non-forwarding state. refer to section 6.4.5, "spanning tree support," on page 75 for additional details. 6.4.1.6 mac destination address lookup priority if enabled globally in the switch engine global ingress configuration register (swe_global_ingrss_cfg) and per entry with the priority enabl e bit, the transmit priority for mac address entries is taken from the associated data of that entry. 6.4.1.7 host access the alr contains a learning engine that is used by the host cpu to add, delete, and modify the mac address table. this engine is accessed by using the switch engine alr command register (swe_alr_cmd) , switch engine alr command status register (swe_alr_cmd_sts) , switch engine alr write data 0 register (swe_alr_wr_dat_0) , and switch engine alr write data 1 register (swe_alr_wr_dat_1) . downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 70 smsc lan9303/lan9303i datasheet the following procedure should be followed in order to add, delete, and modify the alr entries: 1. write the switch engine alr write data 0 register (swe_alr_wr_dat_0) and switch engine alr write data 1 register (swe_alr_wr_dat_1) with the desired mac address and control bits. note: an entry can be deleted by setting the valid bit to 0. 2. write the switch engine alr command register (swe_alr_cmd) register with 0004h (make entry). 3. poll the make pending bit in the switch engine alr command status register (swe_alr_cmd_sts) until it is cleared. 4. write the switch engine alr command register (swe_alr_cmd) with 0000h. the alr contains a search engine that is used by the host to read the mac address table. this engine is accessed by using the switch engine alr command register (swe_alr_cmd) , switch engine alr read data 0 register (swe_alr_rd_dat_0) , and switch engine alr read data 1 register (swe_alr_rd_dat_1) . note: the entries read are not necessarily in the same order as they were learned or manually added. the following procedure should be followed in order to read the alr entries: 1. write the switch engine alr command register (swe_alr_cmd) with 0002h (get first entry). 2. write the switch engine alr command register (swe_alr_cmd) with 0000h (clear the get first entry bit). 3. poll the valid and end of table bits in the switch engine alr read data 1 register (swe_alr_rd_dat_1) until either is set. 4. if the valid bit is set, then the entry is valid and the data from the switch engine alr read data 0 register (swe_alr_rd_dat_0) and switch engine alr read data 1 register (swe_alr_rd_dat_1) can be stored. 5. if the end of table bit is set, then exit. 6. write the switch engine alr command register (swe_alr_cmd) with 0001h (get next entry). 7. write the switch engine alr command register (swe_alr_cmd) with 0000h (clear the get next entry bit). 8. go to step 3. note: refer to section 13.4.3.1, on page 274 through section 13.4.3.6, on page 281 for detailed definitions of these registers. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 71 revision 1.5 (07-08-11) datasheet 6.4.2 forwarding rules upon ingress, packets are filtered or forwarded based on the following rules: ? if the destination port equals the source por t (local traffic), the packet is filtered. ? if the source port is in the disab led state, the packet is filtered. ? if the source port is in the learning or listening / blocking state, the packet is filtered (unless the spanning tree port state override is in effect). ? if the packet is a multicast packet and it is i dentified as a igmp packet and igmp monitoring is enabled (respectively), the packet is redirected to the igmp monitor port(s). this check is not done on special tagged packets from the host cpu port when an alr lookup is not requested. refer to section 6.4.10.1, "packets fr om the host cpu," on page 81 for additional information. ? if the destination port is in the disabled state, t he packet is filtered. (this rule is for a destination mac address which is found in the alr table and the alr result indicates a single destination port. when there are multiple destination ports or when the mac address is not found, the packet is sent to only those ports th at are in the forwarding state.) ? if the destination port is in t he learning or listening / blocking state, the packet is filtered (unless the spanning tree port state override is in effect). (this rule is for a destination mac address which is found in the alr table and the alr result indicates a single destination port. when there are multiple destination ports or when the mac address is not found, the packet is sent to only those ports that are in the forwarding state.) ? if the filter bit for the destination address is set in the alr table, the packet is filtered. ? if the packet has a unicast destination mac addre ss which is not found in the alr table and the drop unknown bit is set, the packet is filtered. ? if the packet has a multicast destination mac addre ss which is not found in the alr table and the filter multicast bit is set, the packet is filtered. ? if the packet has a broadcast destination mac a ddress and the broadcast storm control level has been reached, the packet is discarded. ? if drop on yellow is set, the packet is color ed yellow, and randomly selected, it is discarded. ? if drop on red is set and the packet is colored red, it is discarded. ? if the destination address was not found in the alr table (an unknown or a broadcast) and the broadcast buffer level is exceeded, the packet is discarded. ? if there is insufficient buffer space, the packet is discarded. ? if the destination address was not found in the alr table (an unknown or a broadcast) or the destination address was found in the alr table with the alr result indicating multiple destination ports and the port forward states resulted in zero valid destination ports, the packet is filtered. when the switch is enabled for vlan support, these following rules also apply: ? if the packet is untagged or priority tagged and the admit only vlan bit for the ingress port is set, the packet is filtered. ? if the packet is tagged and has a vi d equal to fffh, it is filtered. ? if enable membership checking on ingress is set, admit non member is cleared, and the source port is not a member of the inco ming vlan, the packet is filtered. ? if enable membership checking on ingress is se t and the destination port is not a member of the incoming vlan, the packet is filtered. (this rule is for a destination mac address which is found in the alr table and the alr result indicates a single destination port. when there are multiple destination ports or when the mac address is not found, the packet is sent to only those ports that are in the forwarding state.) ? if the destination address was not found in the alr table (as unknown or broadcast) or the destination address was found in the alr table with the alr result indicating multiple destination downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 72 smsc lan9303/lan9303i datasheet ports and the vlan broadcast domain containmen t resulted in zero valid destination ports, the packet is filtered. note: for the last three cases, if the vid is not in the vlan table, the vlan is considered foreign and the membership result is null. a null membership will result in the packet being filtered if enable membership checking is set. a null membership will also result in the packet being filtered if the destin ation address is not found in the alr table (since the packet would have no destinations). 6.4.3 transmit priori ty queue selection the transmit priority queue may be selected from five options. as shown in figure 6.4 , the priority may be based on: ? the static value for the destination address in the alr table ? the precedence bits in the ipv4 tos octet ? the diffserv mapping table indexed by the ipv4 tos octet or the ipv6 traffic class octet ? the vlan tag priority field using the per port priority regeneration table ? the port default all options are sent through the traffic class table which maps the selected priority to one of the four output queues. figure 6.4 switch engine transmit queue selection priority calculation programmable diffserv table programmable port default table programmable priority regeneration table per port 3b 3b 3b 2b 6b 3b 3b static da override packet is tagged vl higher priority packet is ipv4 packet is ip use precedence use ip alr priority enable bit ipv4(tos) ipv6(tc) da highest priority priority queue source port alr priority vlan priority ipv4 precedence 2b 3b use tag packet is from host programmable traffic class table downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 73 revision 1.5 (07-08-11) datasheet the transmit queue priority is based on the pa cket type and device configuration as shown in figure 6.5 . refer to section 13.4.3.16, "switch engine global ingress configuration register (swe_global_ingrss_cfg)," on page 293 for definitions of the configuration bits. figure 6.5 switch engine transmit queue calculation da highest priority alr priority enable bit y y resolved priority = priority regen[vlan priority] n packet is ipv4/v6 & use ip resolved priority = ip precedence y use precedence y n resolved priority = diffserv[tc] n n y use tag & packet is tagged y n n resolved priority = default priority[source port] wait for alr result queue = traffic class[resolved priority] packet is ipv4 resolved priority = diffserv[tos] y n get queue done vl higher priority use tag & packet is tagged n y get queue packet from host n y resolved priority = alr priority downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 74 smsc lan9303/lan9303i datasheet 6.4.3.1 port default priority as detailed in figure 6.5 , the default priority is based on the ingre ss ports priority bits in its port vid value. the pvid table is read and written by using the switch engine vlan command register (swe_vlan_cmd) , switch engine vlan write data register (swe_vlan_wr_data) , switch engine vlan read data register (swe_vlan_rd_data) , and switch engine vlan command status register (swe_vlan_cmd_sts) . refer to section 13.4.3.8, on page 283 through section 13.4.3.11, on page 288 for detailed vlan register descriptions. 6.4.3.2 ip precedence based priority the transmit priority queue can be chosen based on the precedence bits of the ipv4 tos octet. this is supported for tagged and non-tagged packets for both type field and length field encapsulations. the precedence bits are the three most signi ficant bits of t he ipv4 tos octet. 6.4.3.3 diffserv based priority the transmit priority queue can be chosen based on the diffserv usage of the ipv4 tos or ipv6 traffic class octet. this is supported for tagg ed and non-tagged packets for both type field and length field encapsulations. the diffserv table is used to determine the packet pr iority from the 6-bit differentiated services (ds) field. the ds field is defined as the six most signif icant bits of the ipv4 tos octet or the ipv6 traffic class octet and is used as an index into the diffserv table. the output of the diffserv table is then used as the priority. this pr iority is then passed through the traffic class table to select the transmit priority queue. note: the diffserv table is not initialized upon rese t or power-up. if diffserv is enabled, then the full table must be initialized by the host. the diffserv table is read and written by using the switch engine diffserv table command register (swe_diffserv_tbl_cfg) , switch engine diffserv table write data register (swe_diffserv_tbl_wr_data) , switch engine diffserv table read data register (swe_diffserv_tbl_rd_data) , and switch engine diffserv tabl e command status register (swe_diffserv_tbl_cmd_sts) . refer to section 13.4.3.12, on page 289 through section 13.4.3.15, on page 292 for detailed diffserv register descriptions. 6.4.3.4 vlan priority as detailed in figure 6.5 , the transmit priority queue can be ta ken from the priority field of the vlan tag. the vlan priority is sent through a per port priority regeneration table, which is used to map the vlan priority into a user defined priority. the priority regeneration tabl e is programmed by using the switch engine po rt 0 ingress vlan priority regeneration table regi ster (swe_ingrss_regen_tbl_0) , switch engine port 1 ingress vlan priority regeneration table register (swe_ingrss_regen_tbl_1) , and switch engine port 2 ingress vlan priority regeneration table register (swe_ingrss_regen_tbl_2) . refer to section 13.4.3.33, on page 312 through section 13.4.3.35, on page 314 for detailed descriptions of these registers. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 75 revision 1.5 (07-08-11) datasheet 6.4.4 vlan support the switch engine supports 16 active vlans out of a possible 4096. the vlan table contains the 16 active vlan entries, each consisti ng of the vid, the port membersh ip, and un-tagging instructions. on ingress, if a packet has a vlan tag containing a valid vid (not 000h or fffh), the vid table is searched. if the vid is found, the vlan is considered active and the membership and un-tag instruction is used. if the vid is not found, the vlan is considered foreign and the membership result is null. a null membership will result in the pa cket being filtered if enable membership checking is set. a null membership will also result in the packet being filtered if the destination address is not found in the alr table (since the packet would have no destinations). on ingress, if a packet does not have a vlan tag or if the vlan tag contains vid with a value of 0 (priority tag), the packet is assigned a vlan based on the port default vid (pvid) and priority. the pvid is then used to access the above vlan table. the usage of the pvid can be forced by setting the 802.1q vlan disable bit, in effect creating port based vlans. the vlan membership of the packet is used for ingress and egress checking and for vlan broadcast domain containment. the un-tag instructions are us ed at egress on ports defined as hybrid ports. refer to section 13.4.3.8, on page 283 through section 13.4.3.11, on page 288 for detailed vlan register descriptions. 6.4.5 spanning tree support hardware support for the spanning tree protocol (stp) and the rapid spanning tree protocol (rstp) includes a per port state register as well as the override bit in the mac address table entries ( section 6.4.1.5, on page 69 ) and the host cpu port special tagging ( section 6.4.10, on page 81 ). the switch engine port state register (swe_port_state) is used to place a port into one of the modes as shown in ta b l e 6 . 2 . normally only port 1 and port 2 are placed into modes other than forwarding. port 0, which is con nected to the host cpu, should normally be left in forwarding mode. figure 6.6 vlan table entry structure table 6.2 spanning tree states port state hardware action software action 11 - disabled received packets on the port are always discarded. transmissions to the port are always blocked. learning on the port is disabled. the host cpu may attempt to send packets to the port in this state, but they will not be transmitted. 17 16 15 14 13 12 vid 11 0 ... un-tag mii member mii un-tag port 1 member port 1 un-tag port 2 member port 2 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 76 smsc lan9303/lan9303i datasheet 6.4.6 ingress flow metering and coloring hardware ingress rate limiting is supported by me tering packet streams and marking packets as either green, yellow, or red according to three traffi c parameters: committed information rate (cir), committed burst size (cbs), and excess burst size (ebs). a packet is mark ed green if it does not exceed the cbs, yellow if it exceeds to cbs but not the ebs, or red otherwise. ingress flow metering and coloring is enabled via the ingress rate enable bit in the switch engine ingress rate configuration re gister (swe_ingrss_rate_cfg) . once enabled, each incoming packet is classified into a stream. streams are defined as per port (3 streams), per priority (8 streams), or per port & priority (24 streams) as selected via the rate mode bits in the switch engine ingress rate configuration regist er (swe_ingrss_rate_cfg) . each stream can have a different cir setting. all streams share co mmon cbs and ebs settin gs. cir, cbs, and ebs are programmed via the switch engine ingress rate command register (swe_ingrss_rate_cmd) and switch engine ingress rate write data register (swe_ingrss_rate_wr_data) . each stream is metered according to rfc 2697. at the rate set by the cir, two token buckets are credited per stream. first, the committed burst bucke t is incremented up to the maximum set by the cbs. once the committed burst bucket is full, th e excess burst bucket is incremented up to the 01 - blocking received packets on the port are discarded unless overridden. transmissions to the port are blocked unless overridden. learning on the port is disabled. the mac address table should be programmed with entries that the host cpu needs to receive (e.g. the bpdu address). the static and override bits should be set. the host cpu may send packets to the port in this state. only packets with stp override will be transmitted. note: there is no hardware distinction between the blocking and listening states. 01 - listening received packets on the port are discarded unless overridden. transmissions to the port are blocked unless overridden. learning on the port is disabled. the mac address table should be programmed with entries that the host cpu needs to receive (e.g. the bpdu address). the static and override bits should be set. the host cpu may send packets to the port in this state. only packets with stp override will be transmitted. 10 - learning received packets on the port are discarded unless overridden. transmissions to the port are blocked unless overridden. learning on the port is enabled. the mac address table should be programmed with entries that the host cpu needs to receive (e.g. the bpdu address). the static and override bits should be set. the host cpu may send packets to the port in this state. only packets with stp override will be transmitted. 00 - forwarding received packets on the port are forwarded normally. transmissions to the port are sent normally. learning on the port is enabled. the mac address table should be programmed with entries that the host cpu needs to receive (e.g. the bpdu address). the static and override bits should be set. the host cpu may send packets to the port in this state. table 6.2 spanning tree states (continued) port state hardware action software action downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 77 revision 1.5 (07-08-11) datasheet maximum set by the ebs. the cir ra te is specified in time per byte. the value programmed is in approximately 20 ns per byte increments. typical values are listed in ta b l e 6 . 3 . when a port is receiving at 10mbps, any setting faster than 39 has the effect of not limiting the rate. after each packet is received, th e bucket is decremented. if the co mmitted burst bucket has sufficient tokens, it is debit ed and the packet is colored green. if the committed burst bucket lacks sufficient tokens for the packet, the excess burst bucket is checked. if the excess burst bucket has sufficient tokens, it is debited, the packet is colored yellow and is subjected to random discard. if the excess burst bucket lacks sufficient tokens for the pa cket, the packet is colored red and is discarded. note: all of the token buckets are initialized to t he default value of 1536. if lower values are programmed into the cbs and ebs parameters, the token buckets will need to be normally depleted below these values before the values have any affect on limiting the maximum value of the token buckets. refer to section 13.4.3.25, on page 303 through section 13.4.3.29, on page 308 for detailed register descriptions. table 6.3 typical ingress rate settings cir setting time per byte bandwidth 0-3 80 ns 100 mbps 4 100 ns 80 mbps 5 120 ns 67 mbps 6 140 ns 57 mbps 7 160 ns 50 mbps 9 200 ns 40 mbps 12 260 ns 31 mbps 19 400 ns 20 mbps 39 800 ns 10 mbps 79 1600 ns 5 mbps 160 3220 ns 2.5 mbps 402 8060 ns 1 mbps 804 16100 ns 500 kbps 1610 32220 ns 250 kbps 4028 80580 ns 100 kbps 8056 161140 ns 50 kbps downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 78 smsc lan9303/lan9303i datasheet 6.4.6.1 ingress flow calculation based on the flow monitoring mode, an ingress flow definition can include the ingress priority. this is calculated similarly to the transmit queue with the exception that the traffic class table is not used. as shown in figure 6.7 , the priority can be based on: ? the static value for the destination address in the alr table. ? the precedence bits in the ipv4 tos octet ? the diffserv mapping table indexed by the ipv4 tos octet or the ipv6 traffic class octet ? the vlan tag priority field using the per port priority regeneration table ? the port default figure 6.7 switch engine ingr ess flow priority selection programmable diffserv table programmable port default table 3b 2b 6b 3b packet is tagged vl higher priority packet is ipv4 packet is ip use precedence use ip ipv4( tos) ipv6(tc) source port vlan priority ipv4 precedence 3b use tag priority calculation packet is from host flow priority 3b 3b static da override programmable priority regeneration table per port alr priority da highest priority alr priority enable bit downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 79 revision 1.5 (07-08-11) datasheet the ingress flow calculation is based on the packe t type and the device configuration as shown in figure 6.8 . figure 6.8 switch engine ingress flow priority calculation da highest priority alr priority enable bit y y flow priority = priority regen[vlan priority] n packet is ipv4/v6 & use ip flow priority = ip precedence y use precedence y n flow priority = diffserv[tc] n n y use tag & packet is tagged y n n flow priority = default priority[source port] wait for alr result packet is ipv4 flow priority = diffserv[tos] y n get flow priority done vl higher priority use tag & packet is tagged n y get flow priority packet from host & queue calculation not requested n y flow priority = alr priority downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 80 smsc lan9303/lan9303i datasheet 6.4.7 broadcast storm control in addition to ingress rate limiting, the device supports hardware broadcast storm control on a per port basis. this feature is enabled via the switch engine broadcast throttling register (swe_bcst_throt) . the allowed rate per port is specified as the number of bytes multiplied by 64 allowed to be received every 1.72 ms interval. pa ckets that exceed this limit are dropped. typical values are listed in ta b l e 6 . 4 . when a port is receiving at 10mbps, any setting above 34 has the effect of not limiting the rate. in addition to the rate limit, the buffer manager broadcast buffer level register (bm_bcst_lvl) specifies the maximum number of buffers that can be used by bro adcasts, multicasts, and unknown unicasts. 6.4.8 ipv4 igmp support the device provides internet group management pr otocol (igmp) hardw are support using two mechanisms: igmp monitoring and multicast pruning. on ingress, if igmp packet monitoring is enabled in the switch engine global ingress configuration register (swe_global_ingrss_cfg) , igmp multicast packets are trapped and redirected to the igmp monitor port (typically set to the port to which the host cpu is connected). igmp packets are identified as ipv4 packets with a protocol of 2. both ethernet and ieee 802.3 frame formats are supported as are vlan tagged packets. once the igmp packets are received by the host cp u, the host software can decide which port or ports need to be members of the multicast group. this group is then added to the alr table as detailed in section 6.4.1.3, "multicast pruning," on page 69 . the host software should also forward the original igmp packet if necessary. normally, packets are never transm itted back to the receiving port . for igmp monitoring, this may optionally be enabled via the switch engine global ingress configuration register (swe_global_ingrss_cfg) . this function would be used if the monitoring port wished to participate in the igmp group without the need to perform special handling in the transmit portion of the driver software. table 6.4 typical br oadcast rate settings broadcast throttle level bandwidth 252 75 mbps 168 50 mbps 134 40 mbps 67 20 mbps 34 10 mbps 17 5 mbps 82 . 4 m b p s 41 . 2 m b p s 3 900 kbps 2 600 kbps 1 300 kbps downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 81 revision 1.5 (07-08-11) datasheet note: most forwarding rules are skipped when a packet is monitored. however, a packet is still filtered if: ? the source port is in the disabled state ? the source port is in the learning or listening / blocking state (unless spanning tree port state override is in effect. ? vlans are enabled, the packet is untagged or priority tagged, and the admit only vlan bit for the ingress port is set. ? vlans are enabled and the packet is tagged and had a vid equal to fffh. ? vlans are enabled, enabled membership checki ng on ingress is set, admit non member is cleared, and the source port is not a member of the incoming vlan. 6.4.9 port mirroring the device supports port mirroring where packets received or transmitted on a port or ports can also be copied onto another sniffer port. port mirroring is configured using the switch engine port mirrori ng register (swe_port_mirror) . multiple mirrored ports can be defined, but only one sniffer port can be defined. when receive mirroring is enabled, packets that are forwarded from a port designated as a mirrored port are also transmitted by the sniffer port. for ex ample, port 2 is setup to be a mirrored port and port 0 is setup to be the sniffer port. if a packet is received on port 2 with a destination of port 1, it is forwarded to both port 1 and port 0. when transmit mirroring is enabled, packets that ar e forwarded to a port designated as a mirrored port are also transmitted by the sniffer port. for example, port 2 is setup to be a mirrored port and port 0 is setup to be the sniffer port. if a packet is received on port 1 with a destination of port 2, it is forwarded to both port 2 and port 0. note: a packet will never be transmitted out of the receiving port. a receive packet is not normally mirrored if it is filtered. th is can optionally be enabled. 6.4.10 host cpu port special tagging the switch engine ingress port type register (swe_ingrss_port_typ) and buffer manager egress port type regist er (bm_egrss_port_type) are used to enable a special vlan tag that is used by the host cpu. this special tag is used to specify the port(s) where packets from the cpu should be sent, and to indicate which port received the packet that was forwarded to the cpu. 6.4.10.1 packets from the host cpu the switch engine ingress port type register (swe_ingrss_port_typ) configures the switch to use the special vlan tag in packets from the host cpu as a destination port indicator. a setting of 11b should be used on the port that is connected to the host cpu (typically port 0). a setting of 00b should be used on the normal network ports. the special vlan tag is a normal vlan tag where the vid field is used as the destination port indicator. vid bit 3 indicates a request for an alr lookup. if vid bit 3 is zero, then bits 0 and 1 specify the de stination port (0, 1, 2) or broadcast (3). bit 4 is used to specify if the stp port state should be overridden. when set, the packet will be transmitted, even if the destination port(s) is (are) in the learning or listening / blocking state. if vid bit 3 is one, then the normal alr lookup is performed and learning is performed on the source address (if enabled in the switch engine port ingre ss configuration register downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 82 smsc lan9303/lan9303i datasheet (swe_port_ingrss_cfg) and the port state for the cpu port is set to forwarding or learning). the stp port state override is taken from the alr entry. vid bit 5 indicates a request to calculate the packe t priority (and egress queue) based on the packet contents. if vid bit 5 is zero, the pri field from t he vlan tag is used as the packet priority. if vid bit 5 is one, the packet priority is calc ulated from the packet contents. the procedure described in section 6.4.3, "transmit priority queue selection," on page 72 is followed with the exception that the special tag is skipped and the vlan priority is taken from the second vl an tag, if it exists. vid bit 6 indicates a request to follow vlan rules. if vid bit 6 is zero, a default membership of all ports is assumed and no vlan rules are followed. if vid bit 6 is one, all ingress and egress vlan rules are followed. the procedure described in section 6.4.2, "forwarding rules," on page 71 is followed with the exception that the special tag is skipped and the vid is taken from the second vlan tag if it exists. upon egress from the destination port(s), the specia l tag is removed. if a regular vlan tag needs to be sent as part of the packet, then it should be part of the packet data from the host cpu port or set as an unused bit in the vid field. note: when specifying port 0 as the destination port, t he vid will be set to 0. a vid of 0 is normally considered a priority tagged packet. such a packet will be filtered if admit only vlan is set on the host cpu port. either avoid setting admit only vlan on the host cpu port or set an unused bit in the vid field. note: the maximum size tagged packet that can normally be sent into a switch port (on port 0) is 1522 bytes. since the special tag consumes four bytes of the packet length, the outgoing packet is limited to 1518 bytes, even if it co ntains a regular vlan tag as part of the packet data. if a larger outgoing packet is required, the jumbo2k bit in the port x mac receive configuration register (mac_rx_cfg_x) of port 0 should be set. 6.4.10.2 packets to the host cpu the buffer manager egress port type register (bm_egrss_port_type) configures the switch to add the special vlan tag in packets to the host cpu as a source port indicator. a setting of 11b should be used only on the port that is connected to the host cpu (typically port 0). other settings can be used on the normal network ports as needed. the special vlan tag is a normal vlan tag where: ? the priority field indicates the packets priority as classified on receive. ? bits 0 and 1 of the vid field specify the source port (0, 1, or 2). ? bit 3 of the vid field indicates the packet was a monitored igmp packet. ? bit 4 of the vid field indicates stp override was set (static and age bits set) in the alr entry for the packets destination mac address. ? bit 5 of the vid field indicates the static bit was set in the alr entry for the packets destination mac address. ? bit 6 of the vid field indicates priority enable wa s set in the alr entry or the packets destination mac address. ? bits 7,8, and 9 of the vid field are the priority field in the alr entry for the packets destination mac address - these can be used as a tag to identify different packet types (ptp, rstp, etc.) when the host cpu adds mac address entries. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 83 revision 1.5 (07-08-11) datasheet note: bits 4 through 9 of the vid field will be all zero for destination mac addresses that have been learned (i.e., not added by the host) or are not found in the alr table (i.e., not learned or added by the host). upon egress from the host cpu port, the special t ag is added. if a regular vlan tag already exists, it is not deleted. instead it will follow the special tag. 6.4.11 counters a counter is maintained per port that contains th e number of mac address that were not learned or were overwritten by a different address due to ma c address table space limi tations. these counters are accessible via the following registers: ? switch engine port 0 learn discard count register (swe_lrn_discrd_cnt_0) ? switch engine port 1 learn discard count register (swe_lrn_discrd_cnt_1) ? switch engine port 2 learn discard count register (swe_lrn_discrd_cnt_2) a counter is maintained per port that contains th e number of packets filtered at ingress. this count includes packets filtered due to broadcast th rottling, but does not include packets dropped due to ingress rate limiting. these counters are accessible via the following registers: ? switch engine port 0 ingress filtered count register (swe_filtered_cnt_0) ? switch engine port 1 ingress filtered count register (swe_filtered_cnt_1) ? switch engine port 2 ingress filtered count register (swe_filtered_cnt_2) 6.5 buffer manager (bm) the buffer manager (bm) provides control of the free buffer space, the multiple priority tran smit queues, transmission scheduling, and packet dropping. vlan tag insertion and removal is also performed by the buffer manager. the following sections detail the various features of the buffer manager. 6.5.1 packet buffe r allocation the packet buffer consists of 32kb of ram that is dynamically allocated in 1 28 byte blocks as packets are received. up to 16 blocks may be used per packe t, depending on the packet length. the blocks are linked together as the packet is received. if a packet is filtered, dropped, or contains a receive error, the buffers are reclaimed. 6.5.1.1 buffer limits a nd flow control levels the bm keeps track of the amount of buffers used per each ingress port. these counts are used to generate flow control (half-duplex backpressure or full-duplex pause frames) and to limit the amount of buffer space that can be used by any individual receiver (hard drop limit). the flow control and drop limit thresholds are dynamic and adapt based on the current buffer usage. based on the number of active receiving ports, the drop level and flow c ontrol pause and resume thresholds adjust between fixed settings and two user programmable levels via the buffer manager drop level register (bm_drop_lvl) , buffer manager flow control pause level register (bm_fc_pause_lvl) , and buffer manager flow control resume level register (bm_fc_resume_lvl) respectively. the bm also keeps a count of the number of buf fers that are queued for multiple ports (broadcast queue). this count is compared against the buffer manager broadcast buffer level register (bm_bcst_lvl) , and if the configured drop level is re ached or exceeded, subsequent packets are dropped. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 84 smsc lan9303/lan9303i datasheet 6.5.2 random earl y discard (red) based on the ingress flow monitoring detailed in section 6.4.6, "ingress flow metering and coloring," on page 76 , packets are colored as green, yellow, or red. packets colored red are always discarded if the drop on red bit in the buffer manager configuration register (bm_cfg) is set. if the drop on yellow bit in the buffer manager configuration register (bm_cfg) is set, packets colored yellow are randomly discarded based on the moving average number of buffers used by the ingress port. the probability of a discard is programmable into the random discard weight table via the buffer manager random discard table command register (bm_rndm_dscrd_tbl_cmd) , buffer manager random discard table write da ta register (bm_rndm_dscrd_tbl_wdata) , and buffer manager random discard table read data register (bm_rndm_dscrd_tbl_rdata) . the random discard weight table contains sixteen entr ies, each 10-bits wide. each entry corresponds to a range of the average number of buffers used by t he ingress port. entry 0 is for 0 to 15 buffers, entry 1 is for 16 to 31 buffers, etc. the probability for ea ch entry us set in 1/1024s. for example, a setting of 1 is 1-in-1024, or approximately 0.1%. a setting of all ones (1023) is 1023-in-1024, or approximately 99.9%. refer to section 13.4.4.10, "buffer manager random discard table command register (bm_rndm_dscrd_tbl_cmd)," on page 330 for additional details on writing and reading the random discard weight table. 6.5.3 transmit queues once a packet has been completely received, it is queued for transmit. there are four queues per transmit port, one for each level of tr ansmit priority. each queue is virtual (if there are no packets for that port/priority, the queue is empty), and dynam ic (a queue may be any length if there is enough memory space). when a packet is read from the memory and sent out to the corresponding port, the used buffers are released. 6.5.4 transmit priori ty queue servicing when a transmit queue is non-empty, it is serviced and the packet is read from the buffer ram and sent to the transmit mac. if ther e are multiple queues that require servicing, one of two methods may be used: fixed priority ordering, or weighted round-robin ordering. if the fixed priority queue servicing bit in the buffer manager configurat ion register (bm_cfg) is set, a strict order, fixed priority is selected. transmit queue 3 has the highest pr iority, followed by 2, 1, and 0. if the fixed priority queue servicing bit in the buffer manager configuration register (bm_cfg) is cleared, a weighted round- robin order is followed. assuming all four queues are non-empty, the service is weighted with a 9:4:2:1 ratio (queue 3,2,1,0). the servicing is blended to avoid burstiness (e.g. queue 3, then queue 2, then queue 3, etc.). 6.5.5 egress rate limiting (leaky bucket) for egress rate limiting, the leaky bucket algorithm is used on each output priority queue. for each output port, the bandwidth that is used by each priority queue can be limited. if any egress queue receives packets faster than the specified egress rate, packets will be accumulated in the packet memory. after the memory is used, packet dropping or flow control will be triggered. note: egress rate limiting occurs before the transmit priority queue servicing , such that a lower priority queue will be serviced if a highe r priority queue is being rate limited. the egress limiting is enabled per priority queue. after a packet is selected to be sent, its length is recorded. the switch then waits a programmable am ount of time, scaled by the packet length, before servicing that queue once again. the amount of ti me per byte is programmed into the buffer manager egress rate registers (refer to section 13.4.4.14 through section 13.4.4.19 for detailed register definitions). the value programmed is in approximately 20 ns per byte increments. typical values are downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 85 revision 1.5 (07-08-11) datasheet listed in ta b l e 6 . 5 . when a port is transmitting at 10 mbps, any setting above 39 has the effect of not limiting the rate. note 6.3 these are the unlimited max bandwidths when ifg and preamble are taken into account. 6.5.6 adding, removing, and changing vlan tags based on the port configuration and the received pa cket formation, a vlan tag can be added to, removed from, or modified in a packet. there are four received packet type cases: non-tagged, priority- tagged, normal-tagged, and cpu special-tagged. ther e are also four possible settings for an egress port: dumb, access, hybrid, and cpu. in addition, each vlan table entry can specify the removal of the vlan tag (the entrys un-tag bit). the tagging/un-tagging rules are specified as follows: ? dumb port - this port type generally does not change the tag. when a received packet is non-tagged, priority-tagged, or normal-tagged, the packet passes untouched. when a packet is received special-tagged from a cpu port, the special tag is removed. ? access port - this port type generally does not support tagging. when a received packet in non-tagged, the packet passes untouched. when a received packet is priority-tagged or normal-tagged, the tag is removed. when a received packet is special-tagged from a cpu port, the special tag is removed. ? cpu port - packets transmitted from this port type generally contain a special tag. special tags are described in detail in section 6.4.10, "host cpu port special tagging," on page 81 . table 6.5 typical egress rate settings egress rate setting time per byte bandwidth @ 64 byte packet bandwidth @ 512 byte packet bandwidth @ 1518 byte packet 0-3 80 ns 76 mbps ( note 6.3 ) 96 mbps ( note 6.3 )9 9 m b p s ( note 6.3 ) 4 100 ns 66 mbps 78 mbps 80 mbps 5 120 ns 55 mbps 65 mbps 67 mbps 6 140 ns 48 mbps 56 mbps 57 mbps 7 160 ns 42 mbps 49 mbps 50 mbps 9 200 ns 34 mbps 39 mbps 40 mbps 12 260 ns 26 mbps 30 mbps 31 mbps 19 400 ns 17 mbps 20 mbps 20 mbps 39 800 ns 8.6 mbps 10 mbps 10 mbps 78 1580 ns 4.4 mbps 5 mbps 5 mbps 158 3180 ns 2.2 mbps 2.5 mbps 2.5 mbps 396 7940 ns 870 kbps 990 kbps 1 mbps 794 15900 ns 440 kbps 490 kbps 500 kbps 1589 31800 ns 220 kbps 250 kbps 250 kbps 3973 79480 ns 87 kbps 98 kbps 100 kbps 7947 158960 ns 44 kbps 49 kbps 50 kbps downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 86 smsc lan9303/lan9303i datasheet ? hybrid port - generally, this port type supports a mix of normal-tagged and non-tagged packets. it is the most complex, but most flexible port type. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 87 revision 1.5 (07-08-11) datasheet for clarity, the following details the incoming un-tag instruction. as described in section 6.4.4, "vlan support," on page 75 , the un-tag instruction is the three un-tag bits from the applicable entry in the vlan table. the entry in the vlan table is either the vlan from the received packet or the ingress ports default vid. ? when a received packet is non-tagged, a new vlan tag is added if two conditions are met. first, the insert tag bit for the egress port in the buffer manager egress port type register (bm_egrss_port_type) must be set. second, the un-tag bit, for the egress port, from the un- tag instruction associated with the ingress ports default vid, must be cleared. the vlan tag that is added will have a vid taken from either the ingr ess or egress ports default vid. the priority of the vlan tag is either the priority calculated on ingress or the egress ports default. the choice of ingress or egress is determined by the egre ss ports vid/priority select bit in the buffer manager egress port type regist er (bm_egrss_port_type) . ? when a received packet is priority-tagged, either the tag is removed or it is modified. if the un-tag bit, for the egress port, from the un-t ag instruction associated with the ingress ports default vid is set, then the tag is removed. otherwise, the tag is modified. the vid of the new vlan tag is changed to either the ingress or egress ports default vid. if the change priority bit in the buffer manager egress port type register (bm_egrss_port_type) for the egress port is set, then the priority field of the new vlan tag is also changed. the priority of the vlan tag is either the priority calc ulated on ingress or the egress ports default. the choice of ingress or egress is determined by the egress ports vid/priority select bit. ? when a received packet is normal-tagged, either the tag is removed, modified, or passed unchanged. if the un-tag bit, for the egress port, from the un- tag instruction associated with the vid in the received packet is set, then the tag is removed. else, if the change tag bit in the buffer manager egress port type register (bm_egrss_port_type) for the egress port is clear, the packet passes untouched. else, if both the change vlan id and the change priority bits in the buffer manager egress port type register (bm_egrss_port_type) for the egress port are clear, the packet passes untouched. otherwise, the tag is modi fied. if the change vlan id bit for the egress port is set, the vid of the new vlan tag is changed to either the ingress or egress ports default vid. if the change priority bit for the egress port is set, the priority field of the new vlan tag is changed to either the priority calculated on ingress or the egress ports default. the choice of ingress or egress is determined by the egress ports vid / priority select bit. ? when a packet is received special-tagged from a cpu port, the special tag is removed. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 88 smsc lan9303/lan9303i datasheet hybrid tagging is summarized in figure 6.9 . the default vlan id and priority of each port may be configured via the following registers: ? buffer manager port 0 default vlan id and priority register (bm_vlan_0) ? buffer manager port 1 default vlan id and priority register (bm_vlan_1) ? buffer manager port 2 default vlan id and priority register (bm_vlan_2) figure 6.9 hybrid port tagging and un-tagging insert tag [egress_port] default vid [ingress_port] un-tag bit y non-tagged y add tag vid = default vid [ingress_port or egress port*] priority = ingress priority or default priority [egress_port]* y send packet untouched n priority tagged default vid [ingress_port] un-tag bit y strip tag n normal tagged received vid un-tag bit y strip tag change tag [egress_port] n n send packet untouched y change priority [egress_port] modify tag vid = default vid [ingress_port or egress port*] priority = ingress priority or default priority [egress_port]* n change vlan id [egress_port] change priority [egress_port] change priority [egress_port] y n n modify tag vid = default vid [ingress port or egress_port*] priority = ingress priority or default priority [egress_port]* y modify tag vid = default vid [ingress port or egress_port*] priority = unchanged n y modify tag vid = unchanged priority = ingress priority or default priority [egress_port]* special tagged strip tag modify tag vid = default vid [ingress_port or egress port*] priority = unchanged n receive tag type *choosen by vid / priority select bit *choosen by vid / priority select bit *choosen by vid / priority select bit *choosen by vid / priority select bit *choosen by vid / priority select bit *choosen by vid / priority select bit downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 89 revision 1.5 (07-08-11) datasheet 6.5.7 counters a counter is maintained per port that contains the number of packets dropped due to buffer space limits and ingress rate limit discarding (red and random yellow dropping). these counters are accessible via the following registers: ? buffer manager port 0 drop count register (bm_drp_cnt_src_0) ? buffer manager port 1 drop count register (bm_drp_cnt_src_1) ? buffer manager port 2 drop count register (bm_drp_cnt_src_2) a counter is maintained per port that contains the number of packets dropped due solely to ingress rate limit discarding (red and random yellow droppi ng). this count value can be subtracted from the drop counter, as described above, to obtain the drop counts due solely to buffer space limits. t he ingress rate drop counters are accessible via the following registers: ? buffer manager port 0 ingress rate drop count register (bm_rate_drp_cnt_src_0) ? buffer manager port 1 ingress rate drop count register (bm_rate_drp_cnt_src_1) ? buffer manager port 2 ingress rate drop count register (bm_rate_drp_cnt_src_2) 6.6 switch fabric interrupts the switch fabric is capable of generating mult iple maskable interrupts from the buffer manager, switch engine, and macs. these interrupts are detailed in section 5.2.1, "switch fabric interrupts," on page 57 . downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 90 smsc lan9303/lan9303i datasheet chapter 7 ethernet phys 7.1 functional overview the device contains three phys: port 1 phy, port 2 phy and a virtual phy. the port 1 & 2 phys are identical in functionality and each connect thei r corresponding ethernet signal pins to the switch fabric mac of their respective port. these phys interface with their respective mac via an internal mii interface. the virtual phy provides the virtual functionality of a phy and allows connection of an external mac to port 0 of the s witch fabric as if it was connected to a single port phy. all phys comply with the ieee 802.3 physical layer for twist ed pair ethernet and can be configured for full/half duplex 100 mbps (100base-tx) or 10mbps (10base-t) ethernet operation. all phy registers follow the ieee 802.3 (clause 22.2.4) spec ified mii management register set and can be configured indirectly via the external mii interface signals, or direct ly via the memory mapped virtual phy registers. in addition, the port 1 phy and port 2 phy can be co nfigured via the phy ma nagement interface (pmi). refer to section 13.3, "ethernet phy control and status registers" for details on the ethernet phy registers. the ethernet phys are discussed in detail in the following sections: ? section 7.2, "port 1 & 2 phys," on page 91 ? section 7.3, "virtual phy," on page 104 7.1.1 phy addressing each individual phy is assigned a unique default phy address via the phy_addr_sel_strap configuration strap as shown in ta b l e 7 . 1 . in addition, the port 1 phy and port 2 phy addresses can be changed via the phy address (phyadd) field in the port x phy special modes register (phy_special_modes_x) . for proper operation, all phy addresses must be unique. no check is performed to assure each phy is set to a different address. configuration strap values are latched upon the de-assertion of a chip-level reset as described in section 4.2.4, "configuration straps," on page 46 . table 7.1 default phy serial mii addressing phy_addr_sel_strap virtual phy default address value port 1 phy default address value port 2 phy default address value 0012 1123 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 91 revision 1.5 (07-08-11) datasheet 7.2 port 1 & 2 phys the port 1 and port 2 phys are functionally identical and can be divided into the following functional sections: ? 100base-tx transmit and 100base-tx receive ? 10base-t transmit and 10base-t receive ? phy auto-negotiation ? hp auto-mdix ? mii mac interface ? phy management control note 7.1 because the port 1 phy and port 2 phy are func tionally identical, this section will describe them as the port x phy, or simply phy . wherever a lowercase x has been appended to a port or signal name, it can be replaced with 1 or 2 to indicate the port 1 or port 2 phy respectively. all references to phy in this section can be used interchangeably for both the port 1 & 2 phys. this nomenclature excludes the virtual phy. a block diagram of the port x phys main components can be seen in figure 7.1 . figure 7.1 port x phy block diagram hp auto-mdix txpx/txnx rxpx/rxnx to external port x ethernet pins 10/100 transmitter 10/100 reciever mii mac interface mii mdio auto- negotiation to port x switch fabric mac to mii mux leds pll phy management control registers from system clocks controller to gpio/led controller interrupts to system interrupt controller downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 92 smsc lan9303/lan9303i datasheet 7.2.1 100base-tx transmit the 100base-tx transmit data path is shown in figure 7.2 . shaded blocks are those which are internal to the phy. each major block is explained in the following sections. 7.2.1.1 mii mac interface for a transmission, the switch fabric mac drives the transmit data to the phys mii mac interface. the mii mac interface is described in detail in section 7.2.7, "mii mac interface" . note: the phy is connected to the s witch fabric mac via standard mii signals. refer to the ieee 802.3 specification for additional details. 7.2.1.2 4b/5b encoder the transmit data passes from the mii block to t he 4b/5b encoder. this block encodes the data from 4-bit nibbles to 5-bit symbols (known as code-groups) according to ta b l e 7 . 2 . each 4-bit data-nibble is mapped to 16 of the 32 possible code-groups. the remaining 16 code-groups are either used for control information or are not valid. the first 16 code-groups are referred to by the hexadecimal values of their corresponding data nibbles, 0 through f. the remaining code-groups are given le tter designations with slashes on either side. for example, an idle code-group is /i/, a tr ansmit error code-group is /h/, etc. figure 7.2 100base-tx transmit data path port x mac 100m tx driver mlt-3 converter nrzi converter 4b/5b encoder magnetics cat-5 rj45 100m pll internal mii 25 mhz by 4 bits internal mii transmit clock 25mhz by 5 bits nrzi mlt-3 mlt-3 mlt-3 mlt-3 scrambler and piso 125 mbps serial mii mac interface 25mhz by 4 bits downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 93 revision 1.5 (07-08-11) datasheet table 7.2 4b/5b code table code group sym receiver interpretation transmitter interpretation 11110 0 0 0000 data 0 0000 data 01001 1 1 0001 1 0001 10100 2 2 0010 2 0010 10101 3 3 0011 3 0011 01010 4 4 0100 4 0100 01011 5 5 0101 5 0101 01110 6 6 0110 6 0110 01111 7 7 0111 7 0111 10010 8 8 1000 8 1000 10011 9 9 1001 9 1001 10110 a a 1010 a 1010 10111 b b 1011 b 1011 11010 c c 1100 c 1100 11011 d d 1101 d 1101 11100 e e 1110 e 1110 11101 f f 1111 f 1111 11111 /i/ idle sent after /t/r/ until the mii transmitter enable signal (txen) is received 11000 /j/ first nibble of ssd, translated to 0101 following idle, else mii receive error (rxer) sent for rising mii transmitter enable signal (txen) 10001 /k/ second nibble of ssd, translated to 0101 following /j/, else mii receive error (rxer) sent for rising mii transmitter enable signal (txen) 01101 /t/ first nibble of esd, causes de-assertion of crs if followed by /r/, else assertion of mii receive error (rxer) sent for falling mii transmitter enable signal (txen) 00111 /r/ second nibble of esd, causes de- assertion of crs if following /t/, else assertion of mii receive error (rxer) sent for falling mii transmitter enable signal (txen) 00100 /h/ transmit error symbol sent fo r rising mii transmit error (txer) 00110 /v/ invalid, mii receive error (rxer) if during mii receive data valid (rxdv) invalid 11001 /v/ invalid, mii receive error (rxer) if during mii receive data valid (rxdv) invalid 00000 /v/ invalid, mii receive error (rxer) if during mii receive data valid (rxdv) invalid downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 94 smsc lan9303/lan9303i datasheet 7.2.1.3 scrambler and piso repeated data patterns (especially the idle code-group) can have power spectral densities with large narrow-band peaks. scrambling the data helps eliminate these peaks and spread the signal power more uniformly over the entire channel bandwidth. this uniform spectral density is required by fcc regulations to prevent excessive emi from being radiated by the physical wiring. the scrambler also performs the parallel in serial out conversion (piso) of the data. the seed for the scrambler is generated from the phy address, ensuring that each phy will have its own scrambler sequence. for more information on phy addressing, refer to section 7.1.1, "phy addressing" . 7.2.1.4 nrzi and mlt-3 encoding the scrambler block passes the 5-bit wide parallel data to the nrzi converter where it becomes a serial 125mhz nrzi data stream. the nrzi is then encoded to mlt-3. mlt-3 is a tri-level code where a change in the logic level represents a code bit 1 and the logic output remaining at the same level represents a code bit 0. 7.2.1.5 100m transmit driver the mlt-3 data is then passed to the analog transmitter, which drives the differential mlt-3 signal on output pins txpx and txnx (where x is replaced with 1 for the port 1 phy, or 2 for the port 2 phy), to the twisted pair media across a 1:1 ratio isolation transformer. the 10base-t and 100base- tx signals pass through the same transformer so that common magnetics can be used for both. the transmitter drives into the 100 impedance of the cat-5 cable. cable termination and impedance matching require external components. 7.2.1.6 100m phase lock loop (pll) the 100m pll locks onto the reference clock and gen erates the 125mhz clock used to drive the 125 mhz logic and the 100base-tx transmitter. 00001 /v/ invalid, mii receive error (rxer) if during mii receive data valid (rxdv) invalid 00010 /v/ invalid, mii receive error (rxer) if during mii receive data valid (rxdv) invalid 00011 /v/ invalid, mii receive error (rxer) if during mii receive data valid (rxdv) invalid 00101 /v/ invalid, mii receive error (rxer) if during mii receive data valid (rxdv) invalid 01000 /v/ invalid, mii receive error (rxer) if during mii receive data valid (rxdv) invalid 01100 /v/ invalid, mii receive error (rxer) if during mii receive data valid (rxdv) invalid 10000 /v/ invalid, mii receive error (rxer) if during mii receive data valid (rxdv) invalid table 7.2 4b/5b code table (continued) code group sym receiver interpretation transmitter interpretation downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 95 revision 1.5 (07-08-11) datasheet 7.2.2 100base-tx receive the 100base-tx receive data path is shown in figure 7.3 . shaded blocks are those which are internal to the phy. each major block is explained in the following sections. 7.2.2.1 a/d converter the mlt-3 data from the cable is fed into the phy on inputs rxpx and rxnx (where x is replaced with 1 for the port 1 phy, or 2 for the port 2 phy) via a 1:1 ratio transformer. the adc samples the incoming differential signal at a rate of 125m samples per second. using a 64-level quantizer, 6 digital bits are generated to represent each sample . the dsp adjusts the gain of the a/d converter (adc) according to the observed signal levels such that the full dynamic range of the adc can be used. 7.2.2.2 dsp: equalizer, blw corre ction and clock/data recovery the 6 bits from the adc are fed into the dsp block. the equalizer in the dsp section compensates for phase and amplitude distortion caused by the physical channel (magnetics, connectors, and cat- 5 cable). the equalizer can restore the signal for any good-quality cat-5 cable between 1m and 150m. if the dc content of the signal is such that the low-frequency components fall below the low frequency pole of the isolation transformer, then the dro op characteristics of the transformer will become significant and baseline wander (blw) on the received signal will result. to prevent corruption of the received data, the phy corrects for blw and can receive the ansi x3.263-1995 fddi tp-pmd defined killer packet with no bit errors. the 100m pll generates multiple phases of the 125mhz clock. a multiplexer, controlled by the timing unit of the dsp, selects the optimum phase for sampling the data. this is used as the received recovered clock. this clock is used to extract the serial data from the received signal. figure 7.3 100base-tx receive data path port x mac a/d converter mlt-3 converter nrzi converter 4b/5b decoder magnetics cat-5 rj45 100m pll internal mii 25mhz by 4 bits internal mii receive clock 25mhz by 5 bits nrzi mlt-3 mlt-3 mlt-3 6 bit data descrambler and sipo 125 mbps serial dsp: timing recovery, equalizer and blw correction mlt-3 mii mac interface 25mhz by 4 bits downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 96 smsc lan9303/lan9303i datasheet 7.2.2.3 nrzi and mlt-3 decoding the dsp generates the mlt-3 recovered levels that are fed to the mlt-3 converter. the mlt-3 is then converted to an nrzi data stream. 7.2.2.4 descrambler and sipo the descrambler performs an inverse function to the scrambler in the transmitter and also performs the serial in parallel out (sipo) conversion of the data. during reception of idle (/i/) symbols. the descr ambler synchronizes its descrambler key to the incoming stream. once synchronizati on is achieved, the descrambler locks on this key and is able to descramble incoming data. special logic in the descrambler ensures synchronization with the remote phy by searching for idle symbols within a window of 4000 bytes (40us). th is window ensures that a maximum packet size of 1514 bytes, allowed by the ieee 802.3 standard, can be received with no interference. if no idle- symbols are detected within this time-period, rece ive operation is aborted and the descrambler re-starts the synchronization process. the de-scrambled signal is then aligned into 5-bit code-groups by recognizing the /j/k/ start-of-stream delimiter (ssd) pair at the start of a packet. once the code-word alignment is determined, it is stored and utilized until the next start of frame. 7.2.2.5 5b/4b decoding the 5-bit code-groups are translated into 4-bit data nibbles according to the 4b/5b table shown in table 7.2 . the translated data is presented on the internal mii rxd[3:0] signal lines to the switch fabric mac. the ssd, /j/k/, is translated to 0101 0101 as the first 2 nibbles of the mac preamble. reception of the ssd causes the phy to assert the rxdv signal, indicating that valid data is available on the rxd bus. successive valid code-groups are translated to data nibbles. reception of either the end of stream delimiter (esd) consisting of the /t /r/ symbols, or at least two /i/ symbols causes the phy to de-assert carrier sense and rxdv. these symbols are not translated into data. 7.2.2.6 receiver errors during a frame, unexpected code-groups are consid ered receive errors. expected code groups are the data set (0 through f), and the /t/r/ (esd) symbol pair. when a receive error occurs, the internal miis rxer signal is asserted and arbitrary data is driven onto the internal receive data bus (rxd) to the switch fabric mac. should an error be detected during the time that the /j/k/ delimiter is being decoded (bad ssd error), rxer is asserted and the value 1110b is driven onto the internal receive data bus (rxd) to the switch fabric mac. note that the internal miis data valid signal (rxdv) is not yet asserted when the bad ssd occurs. 7.2.2.7 mii mac interface for reception, the 4-bit data nibbles are sent to the mii mac interface block where they are sent via mii to the switch fabric mac. the mii mac interface is described in detail in section 7.2.7, "mii mac interface" . note: the phy is connected to the switch fabric mac via standard mii signals. refer to the ieee 802.3 specification for additional details. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 97 revision 1.5 (07-08-11) datasheet 7.2.3 10base-t transmit data to be transmitted comes from the switch f abric mac. the 10base-t transmitter receives 4-bit nibbles from the internal mii at a rate of 2.5mhz and converts them to a 10mbps serial data stream. the data stream is then manchester-encoded and sent to the analog transmitter, which drives a signal onto the twisted pair via the external magnetics. 10base-t transmissions us e the following blocks: ? mii mac interface (digital) ? 10m tx driver (digital/analog) ? 10m pll (analog) 7.2.3.1 mii mac interface for a transmission, the switch fabric mac drives the transmit data to the phys mii mac interface. the mii mac interface is described in detail in section 7.2.7, "mii mac interface" . note: the phy is connected to the switch fabric mac via standard mii signals. refer to the ieee 802.3 specification for additional details. 7.2.3.2 10m tx driver and pll the 4-bit wide data is sent to the 10m tx driver block. the nibbles are converted to a 10mbps serial nrzi data stream. the 10m pll locks onto the external clock or internal o scillator and produces a 20mhz clock. this is used to manchester enc ode the nrz data stream. when no data is being transmitted (txen is low), the 10m tx driver blo ck outputs normal link pulses (nlps) to maintain communications with the remote link partner. the manchester encoded data is sent to the analog transmitter where it is shaped and filtered before be ing driven out as a differential signal across the txpx and txnx outputs (where x is replaced with 1 for the port 1 phy, or 2 for the port 2 phy). 7.2.4 10base-t receive the 10base-t receiver gets the manchester-encoded analog signal from the cable via the magnetics. it recovers the receive clock from the signal and uses this clock to recover the nrzi data stream. this 10m serial data is converted to 4-bit data nibbles which are passed to the controller across the internal mii at a rate of 2.5mhz. 10base-t reception uses the following blocks: ? filter and squelch (analog) ? 10m rx (digital/analog) ? mii mac interface (digital) ? 10m pll (analog) 7.2.4.1 filter and squelch the manchester signal from the cable is fed into the phy on inputs rxpx and rxnx (where x is replaced with 1 for port 1, or 2 for port 2) via 1:1 ratio magnetics. it is first filtered to reduce any out-of-band noise. it then passes through a squelch circuit. the squelch is a set of amplitude and timing comparators that normally reject differential voltage levels below 300mv and detect and recognize differential voltages above 585mv. 7.2.4.2 10m rx and pll the output of the squelch goes to the 10m rx block where it is validated as manchester encoded data. the polarity of the signal is also checked. if the polarity is reversed (local rxp is connected to rxn of the remote partner and vice versa), then this is identified and corrected. the reversed condition downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 98 smsc lan9303/lan9303i datasheet is indicated by the 10base-t polarity state (xpol) in the port x phy special control/status indication register (phy_special_control_stat_ind_x) . the 10m pll locks onto the received manchester signal and generates the received 20mhz clock from it. using this clock, the manchester encoded data is extracted and converted to a 10mhz nr zi data stream. it is then converted from serial to 4-bit wide parallel data. the rx10m block also dete cts valid 10base-t idle signals - normal link pulses (nlps) - to maintain the link. 7.2.4.3 mii mac interface for reception, the 4-bit data nibbles are sent to the mii mac interface block where they are sent via mii to the switch fabric mac. the mii mac interface is described in detail in section 7.2.7, "mii mac interface" . note: the phy is connected to the switch fabric mac via standard mii signals. refer to the ieee 802.3 specification for additional details. 7.2.4.4 jabber detection jabber is a condition in which a station transmits for a period of time longer than the maximum permissible packet length, usually due to a fault condition, that results in holding the txen input for an extended period of time. special logic is used to detect the jabber state and abort the transmission to the line, within 45ms. once txen is deasserted, the logic resets the jabber condition. 7.2.5 phy auto-negotiation the purpose of the auto-negotiation function is to automatically configure the phy to the optimum link parameters based on the capabilities of its link partner. auto-negotiation is a mechanism fo r exchanging configuration information between two link-partners and automatically selecting the highest performance mode of operation supported by both sides. auto-negotiation is fully defined in clause 28 of the ieee 802.3 spec ification and is enabled by setting the auto-negotiation (phy_an) bit of the port x phy basic control re gister (phy_basic_control_x) . the advertised capabilities of the phy are stored in the port x phy auto-negotiation advertisement register (phy_an_adv_x) . the phy contains the ability to advertise 100base-tx and 10base-t in both full or half-duplex modes. besides the connection speed, the phy can advertise remote fault indication and symmetric or asymmetric pause flow control as defined in the ieee 802.3 specification. next page capability is not supported. many of the default advertised capa bilities of the phy are determined via configuration straps as shown in section 13.3.2.5, "port x phy auto-negotiation advertisement register (phy_an_adv_x)," on page 202 . refer to section 4.2.4, "configuration straps," on page 46 for additional details on the configuration straps. once auto-negotiation has completed, information about the resolved link and the results of the negotiation process are reflected in the speed indication bits in the port x phy special control/status register (phy_special_control_status_x) , as well as the port x phy auto-negotiation link partner base page ability register (phy_an_lp_base_ability_x) . the auto-negotiation protocol is a purely physical layer activity and proceeds independently of the mac controller. the following blocks are activated during an auto-negotiation session: ? auto-negotiation (digital) ? 100m adc (analog) ? 100m pll (analog) ? 100m equalizer/blw/clock recovery (dsp) ? 10m squelch (analog) downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 99 revision 1.5 (07-08-11) datasheet ? 10m pll (analog) ? 10m tx driver (analog) auto-negotiation is started by the occurrence of any of the following events: ? power-on reset (por) ? hardware re set (nrst) ? phy software reset (via reset control register (reset_ctl) , or the reset (phy_rst) bit of the port x phy basic control register (phy_basic_control_x) ) ? phy power-down reset ( section 7.2.9, "phy power-down modes," on page 103 ) ? phy link status down (the link status bit of the port x phy basic status register (phy_basic_status_x) is cleared) ? setting the port x phy basic control regi ster (phy_basic_control_x) , restart auto- negotiation (phy_rst_an) bit high ? digital reset (via the digital reset (digital_rst) bit of the reset control register (reset_ctl) ) ? issuing an eeprom loader reload command ( section 8.4, "eeprom loader," on page 115 ) note: refer to section 4.2, "resets," on page 42 for information on these and other system resets. on detection of one of these events, the phy begins auto-negotiation by transmitting bursts of fast link pulses (flp). these are bursts of link pulses from the 10m tx driver. they are shaped as normal link pulses and can pass uncorrupted down cat-3 or cat-5 cable. a fast link pulse burst consists of up to 33 pulses. the 17 odd-numbered pulses, which are always present, frame the flp burst. the 16 even-numbered pulses, which may be present or absent, contain the data word being transmitted. presence of a data pulse represents a 1, while absence represents a 0. the data transmitted by an flp burst is known as a link code word. these are defined fully in ieee 802.3 clause 28. in summary, the phy advertises 802.3 compliance in its selector field (the first 5 bits of the link code word). it advertises its technology ability according to the bits set in the port x phy auto-negotiation advertisement register (phy_an_adv_x) . there are 4 possible matches of the technology ab ilities. in the order of priority these are: ? 100m full duplex (highest priority) ? 100m half duplex ? 10m full duplex ? 10m half duplex (lowest priority) if the full capabilities of the phy are advertised (100 m, full-duplex), and if the link partner is capable of 10m and 100m, then auto-negotiation selects 1 00m as the highest performance mode. if the link partner is capable of half and full-duplex modes, then auto-negotiation selects full-duplex as the highest performance mode. once a speed and duplex match has been determined, the link code words are repeated with the acknowledge bit set. any difference in the main content of the link code words at this time will cause auto-negotiation to re-start. auto-negotiation will al so re-start if all of the required flp bursts are not received. writing the 10base-t half duplex , 10base-t full duplex , 100base-x half duplex , and 100base-x full duplex bits of the port x phy auto-negotiation advertisement register (phy_an_adv_x) allows software control of the capabilities advertised by the phy. writing the port x phy auto-negotiation advertisement register (phy_an_adv_x) does not automatically re-start auto-negotiation. the port x phy basic control regist er (phy_basic_control_x) , restart auto-negotiation (phy_rst_an) bit must be set before the new abilities will be advertised. auto-negotiation can also be disabled via software by clearing the auto-negotiation (phy_an) bit of the port x phy basic control register (phy_basic_control_x) . downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 100 smsc lan9303/lan9303i datasheet 7.2.5.1 phy pause flow control the port 1 & 2 phys are capable of generating and receiving pause flow control frames per the ieee 802.3 specification. the phys advertised pause flow control abilities are set via the symmetric pause and asymmetric pause bits of the port x phy auto-negotiation advertisement register (phy_an_adv_x) . this allows the phy to advertise its fl ow control abilities and auto-negotiate the flow control settings with its link partner. the default values of these bits are determined via configuration straps as defined in section 13.3.2.5, "port x phy auto-negotiation advertisement register (phy_an_adv_x)," on page 202 . the pause flow control settings may also be manually set via the manual flow control registers port 1 manual flow control register (manual_fc_1) and port 2 manual flow control register (manual_fc_2) . these registers allow the switch fabric ports flow control settings to be manually set when auto-negotiation is disabled or the respective manual flow control select bit is set ( port 1 full- duplex manual flow control select (manual_fc_1) for port 1, port 2 full-duplex manual flow control select (manual_fc_2) for port 2). the currently enabled duplex and flow control settings can also be monitored via these registers. the flow control values in the port x phy auto-negotiation advertisement register (phy_an_adv_x) are not affected by the values of the manual flow control register. refer to section 6.2.3, "flow control enable logic," on page 63 for additional information. 7.2.5.2 parallel detection if lan9303/lan9303i is connected to a device lacking the ability to auto-negotiate (i.e. no flps are detected), it is able to determine the speed of the link based on either 100m mlt-3 symbols or 10m normal link pulses. in this case the link is presumed to be half-duplex per the ieee 802.3 standard. this ability is known as parallel detection. th is feature ensures interoperability with legacy link partners. if a link is formed via parallel detection, then the link partner auto-negotiation able bit in the port x phy auto-negotiation expansion register (phy_an_exp_x) is cleared to indicate that the link partner is not capable of auto-negotiation. if a fault occurs during parallel detection, the parallel detection fault bit of the port x phy auto-negotiation expansion register (phy_an_exp_x) is set. the port x phy auto-negotiation link partner base page ability register (phy_an_lp_base_ability_x) is used to store the link partner ability information, which is coded in the received flps. if the link partner is not auto-negotiation capable, then this register is updated after completion of parallel detection to re flect the speed capability of the link partner. 7.2.5.3 restarting auto-negotiation auto-negotiation can be re-started at any time by setting the restart auto-negotiation (phy_rst_an) bit of the port x phy basic control register (phy_basic_control_x) . auto-negotiation will also re-start if the link is broken at any time. a broken link is caused by signal loss. this may occur because of a cable break, or because of an interruption in the signal transmitted by the link partner. auto- negotiation resumes in an attempt to determine the new link configuration. if the management entity re-starts auto-negotiation by writing to the restart auto-negotiation (phy_rst_an) bit of the port x phy basic control re gister (phy_basic_control_x) , the device will respond by stopping all transmission/receiving operations. once the internal break link time of approximately 1200ms has passed in the auto-negotiation state-machine, the auto-negotiation will re- start. in this case, the link partner will have also dropped the link due to lack of a received signal, so it too will resume auto-negotiation. 7.2.5.4 disabling auto-negotiation auto-negotiation can be disabled by clearing the auto-negotiation (phy_an) bit of the port x phy basic control register (phy_basic_control_x) . the phy will then force its speed of operation to reflect the speed ( speed select lsb (phy_speed_sel_lsb) ) and duplex ( duplex mode (phy_duplex) ) of the port x phy basic control regi ster (phy_basic_control_x) . the speed and duplex bits in the port x phy basic control register (phy_basic_control_x) should be ignored when auto-negotiation is enabled. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 101 revision 1.5 (07-08-11) datasheet 7.2.5.5 half vs. full-duplex half-duplex operation relies on the csma/cd (carrier sense multiple access / collision detect ) protocol to handle network traffic and collisions. in this mode, the carrier sense signal, crs, responds to both transmit and receive activity. if data is received while the phy is transmitting, a collision results. in full-duplex mode, the phy is able to transmit and receive data simultaneously. in this mode, crs responds only to receive activity. the csma/cd pr otocol does not apply and collision detection is disabled. 7.2.6 hp auto-mdix hp auto-mdix facilitates the use of cat-3 (10 base-t) or cat-5 (100 base-t) media utp interconnect cable without consideration of interface wiring scheme. if a user plugs in either a direct connect lan cable or a cross-over patch cable, as shown in figure 7.4 ( see note 7.1 on page 91 ) , the phy is capable of configuring the txpx/txn x and rxpx/rxnx twisted pair pins for correct transceiver operation. the internal logic of the device detects the tx and rx pins of the connecting device. since the rx and tx line pairs are interchangeable, special pcb design considerations are needed to accommodate the symmetrical magnetics and termination of an auto-mdix design. the auto-mdix function can be disabled through the auto-mdix control (amdixctrl) bit of the port x phy special control/status indication r egister (phy_special_control_stat_ind_x) . when auto-mdix control (amdixctrl) is cleared, auto-mdix can be selected via the auto-mdix enable configuration straps ( auto_mdix_strap_1 and auto_mdix_strap_2 for port 1 and port 2, respectively). the mdix can also be configured manually via the manual mdix strap ( manual_mdix_strap_1 and manual_mdix_strap_2 for port 1 and port 2, respectively) if both the auto-mdix control (amdixctrl) bit and the auto-mdix enable configuration strap are low. refer to section 3.2, "pin descriptions," on page 24 for more information on the configuration straps. when the auto-mdix control (amdixctrl) bit of the port x phy special control/status indication register (phy_special_control_stat_ind_x) is set to 1, the auto-mdix capability is determined by the auto-mdix enable (amdixen) and auto-mdix state (amdixstate) bits of the port x phy special control/status indication register (phy_special_control_stat_ind_x) . figure 7.4 direct cable connection vs. cross-over cable connection 12 3 4 5 6 7 8 txpx txnx rxpx not used not used rxnx not used not used 12 3 4 5 6 7 8 txpx txnx rxpx not used not used rxnx not used not used direct connect cable rj-45 8-pin straight-through for 10base-t/100base-tx signaling 12 3 4 5 6 7 8 txpx txnx rxpx not used not used rxnx not used not used 12 3 4 5 6 7 8 txpx txnx rxpx not used not used rxnx not used not used cross-over cable rj-45 8-pin cross-over for 10base-t/100base-tx signaling downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 102 smsc lan9303/lan9303i datasheet 7.2.7 mii mac interface the mii mac interface is responsible for the transmission and reception of the ethernet data to and from the switch fabric mac. the phy is connected internally to the switch fabric mac via standard mii signals per ieee 802.3. for a transmission, the switch fabric mac drives th e transmit data onto the internal mii txd bus and asserts txen to indicate valid data. the data is in the form of 4-bit wide data at a rate of 25mhz for 100base-tx, or 2.5mhz for 10base-t. for reception, the 4-bit data nibbles are sent to the mii mac interface block. these data nibbles are clocked to the controller at a rate of 25mhz for 100base-tx, or 2. 5mhz for 10base-t. rxclk is the output clock for the internal mii bus. it is recovered from the received data to clock the rxd bus. if there is no received signal, it is derived from the system reference clock. 7.2.8 phy management control the phy management control block is responsible for the management functions of the phy, including register access and interrupt generation. a serial management interface (smi) is used to support registers 0 through 6 as required by the ieee 802.3 (clause 22), as well as the vendor specific registers allowed by the specification. the smi interface consists of the mii management data (mdio) signal and the mii management clock (mdc) signal. these signals interface to the mdio and mdc pins of lan9303/lan9303i (or the pmi block in i 2 c mode of operation) and allow access to all phy registers. refer to section 13.3.2, "port 1 & 2 phy registers," on page 194 for a list of all supported registers and register descriptions. non-su pported registers will be read as ffffh. 7.2.8.1 phy interrupts the phy contains the ability to generate various interrupt events as described in table 7.3 . reading the port x phy interrupt source flags register (phy_interrupt_source_x) shows the source of the interrupt, and clears the interrupt signal. the port x phy interrupt mask register (phy_interrupt_mask_x) enables or disables each phy interrupt. the phy management control block aggregates the enabled interrupts status into an internal signal which is sent to the system interrupt controller and is reflected via the interrupt status register (int_sts) bits port 1 phy interrupt event (phy_int1) and port 2 phy interrupt event (phy_int2) for the port 1 and port 2 phys, respectively. for more information on interrupts, refer to chapter 5, "system interrupts," on page 55 . table 7.3 phy interrupt sources interrupt source phy_interrupt_mask_x & phy_interrupt_source_x register bit # energyon activated 7 auto-negotiation complete 6 remote fault detected 5 link down (link status negated) 4 auto-negotiation lp acknowledge 3 parallel detection fault 2 auto-negotiation page received 1 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 103 revision 1.5 (07-08-11) datasheet 7.2.9 phy power-down modes there are two power-down modes for the phy: ? phy general power-down ? phy energy detect power-down note: for more information on the various power management features of the device, refer to section 4.3, "power management," on page 54 . note: the power-down modes of each phy (port 1 phy and port 2 phy) are controlled independently. note: the phy power-down modes do not reload or reset the phy registers. 7.2.9.1 phy general power-down this power-down mode is controlled by the power down (phy_pwr_dwn) bit of the port x phy basic control register (phy_basic_control_x) . in this mode the enti re phy, except the phy management control interface, is powered down. the phy will remain in this power-down state as long as the bit is set. when the bit is cleared, the phy powers up and is automatically reset. 7.2.9.2 phy energy detect power-down this power-down mode is enabled by setting the energy detect power-down (edpwrdown) bit of the port x phy mode control/status r egister (phy_mode_ control_status_x) . when in this mode, if no energy is detected on the line, the entire phy is powered down except for the phy management control interface, the squelch circuit, and the energyon logic. the energyon logic is used to detect the presence of valid ener gy from 100base-tx, 10base-t, or auto-negotiation signals and is responsible for driving the energyon signal, whose state is reflected in the energy on (energyon) bit of the port x phy mode control/status register (phy_mode_control_status_x) . in this mode, when the energyon signal is cleared, the phy is powered down and no data is transmitted from the phy. when energy is received , via link pulses or packets, the energyon signal goes high, and the phy powers up. the phy automatically resets itself into its previous state prior to power-down, and asserts the int7 interrupt bit of the port x phy interrupt source flags register (phy_interrupt_source_x) . the first and possibly second packet to activate energyon may be lost. when the energy detect power-down (edpwrdown) bit of the port x phy mode control/status register (phy_mode_control_status_x) is low, energy detect power-down is disabled. 7.2.10 phy resets in addition to the chip-level hardware reset (nrst) and power-on reset (por), the phy supports three block specific resets. these are discussed in the following sections. for detailed information on all resets and the reset sequence refer to section 4.2, "resets," on page 42 . note: the digital reset (digital_rst) bit in the reset control register (reset_ctl) does not reset the phys. only a hardware reset (nrst) or an eeprom reload command will automatically reload the configuration strap values into the phy registers. for all other phy resets, these values will need to be manually configured via software. 7.2.10.1 phy software reset via reset_ctl the phy can be reset via the reset control register (reset_ctl) . the port 1 phy is reset by setting the port 1 phy reset (phy1_rst) bit, and the port 2 phy is reset by setting the port 2 phy downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 104 smsc lan9303/lan9303i datasheet reset (phy2_rst) bit. these bits are self clearing after approximately 102us. this reset does not reload the configuration strap values into the phy registers. 7.2.10.2 phy software reset via phy_basic_ctrl_x the phy can also be reset by setting the reset (phy_rst) bit of the port x phy basic control register (phy_ basic_control_x) . this bit is self clearing and will return to 0 after the reset is complete. this reset does not reload the configuration strap values into the phy registers. 7.2.10.3 phy power-down reset after the phy has returned from a power-down state, a reset of the phy is automatically generated. the phy power-down modes do not reload or reset the phy registers. refer to section 7.2.9, "phy power-down modes," on page 103 for additional information. 7.2.11 leds each phy provides led indication signals to the gpio/led block of the device. this allows external leds to be used to indicate various phy related functions such as tx/rx activity, speed, duplex, or link status. refer to chapter 12, "gpio/led controller," on page 135 for additional information on the configuration of these signals. 7.2.12 required ethernet magnetics the magnetics selected for use with the device should be an auto-mdix style magnetic, which is widely available from several vendors. please re view the smsc applic ation note 8.13 suggested magnetics for the latest qualified and suggested magnetics. a list of vendors and part numbers are provided within the application note. 7.3 virtual phy the virtual phy provides a basic mii management interface (mdio) to the mii management pins per the ieee 802.3 (clause 22) so that a mac with an unmodified driver can be supported as if the mac was attached to a single port phy. this functionality is designed to allow easy and quick integration of the device into designs with minimal driver modi fications. the virtual phy provides a full bank of registers which comply with the ieee 802.3 specification. this enabl es the virtual phy to provide various status and control bits similar to those provided by a real phy. these include the output of speed selection, duplex, loopback, isolate, collision test, and auto-negotiation status. for a list of all virtual phy registers and related bit descriptions, refer to section 13.3.1, "virtual phy registers," on page 194 . 7.3.1 virtual phy auto-negotiation the purpose of the auto-negotiation function is to automatically configure the virtual phy to the optimum link parameters based on the capabilities of its link partner. because the virtual phy has no actual link partner, the auto-negotiation process is emulated with deterministic results. auto-negotiation is enabled by setting the auto-negotiation (vphy_an) bit of the virtual phy basic control register (vphy_basic_ctrl) and is restarted by the occu rrence of any of the following events: ? power-on reset (por) ? hardware re set (nrst) ? phy software reset (via the virtual phy reset (vphy_rst) bit of the reset control register (reset_ctl) , or the reset (vphy_rst) bit of the virtual phy basic control register (vphy_basic_ctrl) ) downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 105 revision 1.5 (07-08-11) datasheet ? setting the virtual phy basic control register (vphy_basic_ctrl) , restart auto-negotiation (vphy_rst_an) bit high ? digital reset (via the digital reset (digital_rst) bit of the reset control register (reset_ctl) ) ? issuing an eeprom loader reload command ( section 8.4, "eeprom loader," on page 115 ) the emulated auto-negotiation process is much simpler than the real process and can be categorized into three steps: 1. the auto-negotiation complete bit is set in the virtual phy basic status register (vphy_basic_status) . 2. the page received bit is set in the virtual phy auto-negotiation expansion register (vphy_an_exp) . 3. the auto-negotiation result (speed, duplex, and pause) is determined and registered. the auto-negotiation result (speed and duplex) is determined using the highest common denominator (hcd) of the virtual phy auto-negotiation advertisement register (vphy_an_adv) and virtual phy auto-negotiation link partner base pa ge ability register ( vphy_an_lp_base_ability) as specified in the ieee 802.3 standard . the technology ability bits of these registers are anded, and if there are multiple bits in common, the priority is determined as follows: ? 100mbps full duplex (highest priority) ? 100mbps half duplex ? 10mbps full duplex ? 10mbps half duplex (lowest priority) for example, if the full capabilities of the virt ual phy are advertised (100mbps, full duplex), and if the link partner is capable of 10mbps and 100mbps, then auto-negotiation selects 100mbps as the highest performance mode. if the link partner is capable of half and full-duplex modes, then auto- negotiation selects full-duplex as the highest performance operation. in the event that there are no bits in common, an emulated parallel detection is used. the virtual phy auto-negotiation advertisement register (vphy_an_adv) defaults to having all four ability bits set. these values can be reconfigured via software. once the auto-negotiation is complete, any change to the virtual phy auto-negotiation advertisement register (vphy_an_adv) will not take affect until the auto-negotiation process is re-run. the emulated link partner default advertised abilities in the virtual phy auto-negotiation link partner base page ability register (vphy_an_lp_base_ability) are dependant on the p0_duplex pin and the duplex_pol_strap_0 and speed_strap_0 configuration straps as described in table 13.7 of section 13.2.6.6, "virtual phy auto-negotiation link partner base page abilit y register (vphy_an_lp_base_ability)," on page 181 . neither the virtual phy or the emulated link partner support next page capability, remote faults, or 100base-t4. note: the p0_duplex, duplex_pol_strap_0 , and speed_strap_0 inputs are considered to be static. auto-negotiation is not automatically re-evaluated if these inputs are changed. if there is at least one common selection between the emulated link partner and the virtual phy advertised abilities, then the auto-negotiation succeeds, the link partner auto-negotiation able bit of the virtual phy auto-negotiation expansion register (vphy_an_exp) is set, and the technology ability bits in the virtual phy auto-negotiation link partner base page ability register (vphy_an_lp_base_ability) are set to indicate the emulated link partners abilities. note: for the virtual phy, the auto-negotiation register bits (and management of such) are used by the pmi. so the perception of local and link partner is reversed. the local device is the pmi, while the link partner is the switch fabric. this is consistent with the intention of the virtual phy. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 106 smsc lan9303/lan9303i datasheet 7.3.1.1 parallel detection in the event that there are no common bits betw een the advertised ability and the emulated link partners ability, auto-negotiation fails and emulated parallel detect is used. in this case, the link partner auto-negotiation able bit of the virtual phy auto-negotiation expansion register (vphy_an_exp) will be cleared, and the communication set to half-duplex. the speed is determined by the speed_strap_0 configuration strap. only one of the technology ability bits in the virtual phy auto-negotiation link partner base page ability register (vph y_an_lp_base_ability) will be set, indicating the emulated parallel detect result. 7.3.1.2 disabling auto-negotiation auto-negotiation can be disabled in the virtual phy by clearing the auto-negotiation (vphy_an) bit of the virtual phy basic control register (vphy_basic_ctrl) . the virtual phy will then force its speed of operation to reflect the speed ( speed select lsb (vphy_speed_sel_lsb) bit) and duplex ( duplex mode (vphy_duplex) bit) of the virtual phy basic control re gister (vphy_basic_ctrl) . the speed and duplex bits in the virtual phy basic control r egister (vphy_basic_ctrl) should be ignored when auto-negotiation is enabled. 7.3.1.3 virtual phy pause flow control the virtual phy supports pause flow control per the ieee 802.3 specification. the virtual phys advertised pause flow control abilities are set via the symmetric pause and asymmetric pause bits of the virtual phy auto-negotiation advert isement register (vphy_an_adv) . this allows the virtual phy to advertise its flow control abilities and auto-negotiate the flow control settings with the emulated link partner. the default values of these bits are as shown in section 13.2.6.5, "virtual phy auto- negotiation advertisement register (vphy_an_adv)," on page 179 . the symmetric/asymmetric pause ability of the emulated link part ner is based upon the advertised pause flow control abilities of the virtual phy as indicated in the symmetric pause and asymmetric pause bits of the virtual phy auto-negotiation advertisement register (vphy_an_adv) . thus, the emulated link partner always accommodates the asymmetric/symmetric pause ability settings requested by the virtual phy, as shown in table 13.6, emulated link partner pause flow control ability default values, on page 182 . the pause flow control settings may also be manually set via the port 0 manual flow control register (manual_fc_0) . this register allows the switch fabric port 0 flow control settings to be manually set when auto-negotiation is disabled or the port 0 full-duplex manual flow control select (manual_fc_0) bit is set. the currently enabled duplex and flow control settings can also be monitored via this register. the flow control values in the virtual phy auto-negotiation advertisement register (vphy_an_adv) are not affected by the values of the manual flow control register. refer to section 6.2.3, "flow control enable logic," on page 63 for additional information. 7.3.2 virtual phy in mac mode in the mac mode of operation, an external phy is connected to the mii interface of the device. because there is an external phy present, the virtual phy is not needed for external configuration. however, the port 0 switch fabric mac still requires the proper duplex setting. therefore, in mac mode, if the auto-negotiation (vphy_an) bit of the virtual phy basic control register (vphy_basic_ctrl) is set, the duplex is based on the p0_duplex pin and duplex_pol_strap_0 configuration strap. if these signals are equal, the port 0 switch fabric mac is configured for full- duplex, otherwise it is set for half-duplex. the p0_duplex pin is typically connected to the duplex indication of the external phy. the duplex is not latched since the auto-negotiation process is not used. the duplex can be manually selected by clearing the auto-negotiation (vphy_an) bit and controlling the duplex mode (vphy_duplex) bit in the virtual phy basic control register (vphy_basic_ctrl) . downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 107 revision 1.5 (07-08-11) datasheet note: in mac mode, the virtual phy registers are accessible through their memory mapped registers via the smi or i 2 c serial management interfaces only. the virtual phy registers are not accessible through mii management. 7.3.2.1 full-duplex flow control in the mac mode of operation, the virtual phy is no t applicable. therefore, full-duplex flow control should be controlled manually by the host via the port 0 manual flow control register (manual_fc_0) , based on the external phys auto-negotiation results. 7.3.3 virtual phy resets in addition to the chip-level hardware reset (nrst) and power-on reset (por), the virtual phy supports two block specific resets . these are is discussed in the following sections. for detailed information on all resets, refer to section 4.2, "resets," on page 42 . 7.3.3.1 virtual phy soft ware reset via reset_ctl the virtual phy can be reset via the reset control register (reset_ctl) by setting the virtual phy reset (vphy_rst) bit. this bit is self clearing after approximately 102us. 7.3.3.2 virtual phy software reset via vphy_basic_ctrl the virtual phy can also be reset by setting the reset (vphy_rst) bit of the virtual phy basic control register (vphy_basic_ctrl) . this bit is self clearing and will return to 0 after the reset is complete. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 108 smsc lan9303/lan9303i datasheet chapter 8 serial management 8.1 functional overview this chapter details the serial management function ality provided by the device, which includes the eeprom i 2 c master, eeprom loader, and i 2 c slave controller. the i 2 c eeprom controller is an i 2 c master module which interfac es an optional external eeprom with the system register bus and the eeprom loader . multiple sizes of external eeproms are supported. configuration of the eeprom size is accomplished via the eeprom_size_strap configuration strap. various commands are supported for eeprom access, allowing for the storage and retrieval of static data. the i 2 c interface conforms to the nxp i 2 c-bus specification . the eeprom loader provides the autom atic loading of conf iguration settings fr om the eeprom into the device at reset. the eeprom loader module interfaces to the eeprom controller, ethernet phys, and the system csrs. the i 2 c slave controller can be used for cpu serial management and allow cpu access to all system csrs. the i 2 c slave controller implements the low level i 2 c slave serial interface (start and stop condition detection, data bit transmission/reception, and acknowledge generation/reception), handles the slave command protocol, and performs system register reads and writes. the i 2 c slave controller conforms to the nxp i 2 c-bus specification . 8.2 i 2 c overview i 2 c is a bi-directional 2-wire data protocol. a device that sends data is defined as a transmitter and a device that receives data is defined as a receiver . the bus is controlled by a master which generates the ee_scl clock, controls bus access, and generates the start and stop conditions. either the master or slave may operate as a transmitter or receiver as determined by the master. the device implements an i 2 c master for accessing an external eeprom and an i 2 c slave for control by a management master. both the clock and data signals have digital input filters that reject pulses that are less than 100ns. the i 2 c master and the i 2 c slave serial interfaces share common pins. the data pin is driven low when either interface sends a low, emulating the wired-and function of the i 2 c bus. since the slave interface never drives the clock pin, the wired-and is not necessary. the following bus states exist: ? idle: both ee_sda/sda and ee_scl/scl are high when the bus is idle. ? start & stop conditions: a start condition is defined as a high to low transition on the ee_ sda line while ee_ scl is high. a stop condition is defined as a low to high transition on the ee_sda line while ee_scl is high. the bus is considered to be busy following a start condition and is considered free 4.7us/1.3us (for 100khz and 400khz operation, respectively) following a stop condition. the bus stays busy following a repeated start condition (instead of a stop condition). starts and repeated starts are otherwise functionally equivalent. ? data valid: data is valid, following the start condition, when ee_sda is stable while ee_scl is high. data can only be changed while the clock is low. there is one valid bit per clock pulse. every byte must be 8 bits long and is transmitted msb first. ? acknowledge: each byte of data is followed by an acknowledge bit. the master generates a ninth clock pulse for the acknowledge bit. the transmitter releases ee_sda/sda (high). the receiver drives ee_sda/sda low so that it remains valid during the high period of the clock, taking into account the setup and hold times. the receiver may be the master or the slave depending on the direction of the data. typically the receiver acknowledges each byte. if the master is the receiver, it does not generate an acknowledge on the last byte of a transfer. this informs the slave to not drive the next byte of data so that the master may generate a stop or repeated start condition. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 109 revision 1.5 (07-08-11) datasheet figure 8.1 displays the various bus states of a typical i 2 c cycle. 8.3 i 2 c master eeprom controller the i 2 c eeprom controller supports i 2 c compatible eeproms. note: when the eeprom loader is running, it has exclusive use of the i 2 c eeprom controller. refer to section 8.4, "eeprom loader" for more information. the i 2 c master implements a low level serial interface (start and stop condition generation, data bit transmission and reception, acknowledge generation and reception) for connection to i2c eeproms, and consists of a data wire (ee_sda) and a serial clock (ee_scl). the serial clock is driven by the master, while the data wire is bi-directional. both signals are open-drain and require external pull- upresistors. the i 2 c master interface runs at the standard-mode rate of 100khz and is fully compliant with the nxp i 2 c-bus specification . refer to the he nxp i 2 c-bus specification for detailed timing information. based on the eeprom_size_strap configuration strap, various sized i 2 c eeproms are supported. the varying size ranges are supported by additional bits in the eeprom controller address (epc_address) field of the eeprom command register (e2p_cmd) . within each size range, the largest eeprom uses all the address bits, while the smaller eeproms treat the upper address bits as dont cares. the eeprom controller drives all the address bits as requested regardless of the actual size of the eeprom. the supported size ranges for i 2 c operation are shown in table 8.1 . note 8.1 bits in the control byte are used as the upper address bits. figure 8.1 i 2 c cycle table 8.1 i 2 c eeprom size ranges eeprom_size_strap # of address bytes eeprom size eeprom types 01 ( note 8.1 ) 16 x 8 through 2048 x 8 24xx00, 24xx01, 24xx02, 24xx04, 24xx08, 24xx16 1 2 4096 x 8 through 65536 x 8 24xx32, 24xx64, 24xx128, 24xx256, 24xx512 ee_sda ee_scl s start condition p stop condition data valid or ack data valid or ack data stable data can change data stable data can change sr re-start condition data can change data can change downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 110 smsc lan9303/lan9303i datasheet 8.3.1 i 2 c eeprom device addressing the i 2 c eeprom is addressed for a read or write o peration by first sending a control byte followed by the address byte or bytes. the control byte is preceded by a start condition. the control byte and address byte(s) are each acknowledged by the eeprom slave. if the eeprom slave fails to send an acknowledge, then the sequence is aborted and the eeprom controller ti meout (epc_timeout) bit of the eeprom command register (e2p_cmd) is set. the control byte consists of a 4-bit control code, 3-bits of chip/block select and one direction bit. the control code is 1010b. for single byte addressing eeproms, the chip/block select bits are used for address bits 10, 9, and 8. for double byte addressing eeproms, the chip/block select bits are set low. the direction bit is set low to indicate the address is being written. figure 8.2 illustrates typical i 2 c eeprom addressing bit order for single and double byte addressing. 8.3.2 i 2 c eeprom byte read following the device addressing, a data byte may be read from the eeprom by outputting a start condition and control byte with a control code of 1010b, chip/block select bits as described in section 8.3.1 , and the r/~w bit high. the eeprom will respond with an acknowledge, followed by 8- bits of data. if the eeprom slave fails to send an acknowledge, then the sequence is aborted and the eeprom controller timeout (epc_timeout) bit in the eeprom command register (e2p_cmd) is set. the i 2 c master then sends a no-acknowledge, followed by a stop condition. figure 8.3 illustrates typical i 2 c eeprom byte read for single and double byte addressing. for a register level description of a read operation, refer to section 8.3.7, "i2c master eeprom controller operation," on page 113 . figure 8.2 i 2 c eeprom addressing figure 8.3 i 2 c eeprom byte read s 1 0 1 0 a 10 a 9 a 8 0 r/~w control byte a 7 a 6 a 5 a 4 a 3 a 2 a 1 a 0 a c k a c k chip / block select bits s 1 0 1 0 0 control byte a c k a c k single byte addressing double byte addressing a 7 a 6 a 5 a 4 a 3 a 2 a 1 a 0 a c k address byte address low byte address high byte a 9 a 8 0 0 0 a 15 a 14 a 13 a 12 a 11 a 10 r/~w chip / block select bits s 1 0 1 0 a 10 a 9 a 8 control byte a c k s 1 0 1 0 control byte a c k single byte addressing read double byte addressing read 0 0 0 1 data byte d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 a c k p 1 data byte d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 a c k p a c k a c k r/~w chip / block select bits r/~w chip / block select bits downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 111 revision 1.5 (07-08-11) datasheet 8.3.3 i 2 c eeprom sequential byte reads following the device addressing, data bytes may be read sequentially from the eeprom by outputting a start condition and control byte with a control code of 1010b, chip/block select bits as described in section 8.3.1 , and the r/~w bit high. the eeprom will respond with an acknowledge, followed by 8- bits of data. if the eeprom slave fails to send an acknowledge, then the sequence is aborted and the eeprom controller timeout (epc_timeout) bit in the eeprom command register (e2p_cmd) is set. the i 2 c master then sends an acknowledge, and the eeprom responds with the next 8-bits of data. this continues until the last desired byte is read, at which point the i 2 c master sends a no-acknowledge, followed by a stop condition. figure 8.3 illustrates typical i 2 c eeprom sequential byte reads fo r single and doubl e byte addressing. sequential reads are used by the eeprom loader. refer to section 8.4, "eeprom loader" for additional information. for a register level description of a read operation, refer to section 8.3.7, "i2c master eeprom controller operation," on page 113 . 8.3.4 i 2 c eeprom byte writes following the device addressing, a data byte may be written to the eeprom by outputting the data after receiving the acknowledge from the eepr om. the data byte is acknowledged by the eeprom slave and the i 2 c master finishes the write cycle with a st op condition. if the eeprom slave fails to send an acknowledge, then the sequence is aborted and the eeprom controller timeout (epc_timeout) bit in the eeprom command register (e2p_cmd) is set. following the data byte write cycle, the i 2 c master will poll the eeprom to determine when the byte write is finished. after meeting the minimum bus free time, a start condition is sent followed by a control byte with a control code of 1010b, chip/block select bits low, and the r/~w bit low. if the eeprom is finished with the byte write, it will respond with an acknowledge. otherwise, it will respond with a no- acknowledge and the i 2 c master will issue a stop and repeat the poll. if the acknowledge does not occur within 30ms, a time-out occurs. the check for timeout is only performed following each no- acknowledge, since it may be possible that the eeprom write finished before the timeout but t he 30ms expired before the poll was performed (due to the bus being used by another master). once the i 2 c master receives the acknowledge, it concludes by sending a start condition, followed by a stop condition, which will place the eeprom into standby. figure 8.4 i 2 c eeprom sequenti al byte reads s 1 0 1 0 a 10 a 9 a 8 control byte a c k s 1 0 1 0 control byte a c k single byte addressing sequential reads 0 0 0 1 data byte d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 a c k p 1 data byte d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 a c k a c k a c k data byte d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 a c k data byte d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 a c k p a c k data byte d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 a c k data byte d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 double byte addressing sequential reads ... r/~w chip / block select bits r/~w chip / block select bits ... downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 112 smsc lan9303/lan9303i datasheet figure 8.3 illustrates typical i 2 c eeprom byte write. for a register level description of a write operation, refer to section 8.3.7, "i 2c master eeprom controller operation," on page 113 . 8.3.5 wait state generation the serial clock is also used as an input as it can be held low by the slave device in order to wait- state the data cycle. once the slave has data available or is ready to receive, it will release the clock. assuming the masters clock low time is also expire d, the clock will rise a nd the cycle will continue. if the slave device holds the clock low for more than 30ms, the current command sequence is aborted and the eeprom controller ti meout (epc_timeout) bit in the eeprom command register (e2p_cmd) is set. 8.3.6 i 2 c bus arbitration and clock synchronization since the i 2 c master and the i 2 c slave serial interfaces share common pins, there are at least two master i 2 c devices on the bus (the device and the host). there exists the potential that both masters try to access the bus at the same time. the i 2 c specification handles this situation with three mechanisms: bus busy, clock synchronization and bus arbitration. note: the timing parameters referred to in the following subsections refer to the detailed timing information presented in the nxp i 2 c-bus specification . 8.3.6.1 bus busy a master may start a transfer only if the bus is not busy. the bus is considered to be busy after the start condition and is considered to be free again t buf time after the stop condition. the standard mode value of 4.7us is used for t buf since the eeprom master runs at the standard mode rate. following reset, it is unknown if the bus is actually busy, since the start condition may have been missed. therefore, following reset, the bus is init ially considered busy and is considered free t buf time after the stop condition or if clock and data are seen high for 4ms. in order to speed up d evice configuration, if the management mode is not i 2 c, this check is not performed (the bus is initially considered free). 8.3.6.2 clock synchronization clock synchronization is used, since both masters may be generating different clock frequencies. when the clock is driven low by one master, each other active master will restart its low timer and also drive the clock low. each master will drive the clock low for its minimum low time and then release it. the clock line will not go high until all masters have released it. the slowest master therefore determines the actual low time. de vices with shorter low timers will wait. once the clock goes high, each master will start its high timer. the first master to reach its high time will once again drive the clock low. the fastest master therefore determines the actual high time. the process then repeats. clock synchronization is similar to the cycle stretching that can be d one by a slave device, with the figure 8.5 i 2 c eeprom byte write a c k data byte p a c k s 1 0 1 0 0 control byte 0 0 0 s 1 0 1 0 0 0 0 0 s 1 0 1 0 0 0 0 0 ... d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 a c k a c k a c k s p poll cycle poll cycle poll cycle data cycle conclude r/~w chip / block select bits r/~w chip / block select bits r/~w chip / block select bits control byte control byte downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 113 revision 1.5 (07-08-11) datasheet exception that a slave device can only extend the low time of the clock. it can not cause the falling edge of the clock. 8.3.6.3 arbitration arbitration involves testing the input data vs. the output data, when the clock goes high, to see if they match. since the data line is wired-anded, a master transmitting a high value will see a mismatch if another master is transmitting a low value. the comp arison is not done when receiving bits from the slave. arbitration starts with the control byte and, if both masters are accessing the same slave, can continue into address and data bits (for writes) or acknowledge bits (for reads). if desired, a master that loses arbitration can continue to generate clock pulses until the end of the loosing byte (note that the ack on a read is considered the end of the byte) but the losing master may no longer drive any data bits. it is not permitted fo r another master to access the eepr om while the device is using it during startup or due to an eeprom command. the other master should wait sufficient time or poll the device to determin e when the eeprom is available. this re striction simplifies the arbitration and access process since arbitration will always be resolved when transmitting the 8 control bits during the device addressing or during the poll cycles. if arbitration is lost during the device addressing, the i 2 c master will return to the beginning of the device addressing sequence and wait for the bus to become free. if arbitration is lost during a poll cycle, the i 2 c master will return to the beginning of the poll cycle sequence and wait for the bus to become free. note that in this case the 30ms time out counter should not be reset. if the 30ms timeout should expire while waiting for the bus to become free, the sequence should not abort without first completing a final poll (with the exception of the busy / arbitration timeout described in section 8.3.6.4 ). 8.3.6.4 timeout due to busy or arbitration it is possible for another master to monopolize the bus (due to a continual bus busy or more successful arbitration). if successful arbitration is not achieved within 1.92 seconds from the start of the read or write request or from the start of the poll cycle, the co mmand sequence or poll cycle is aborted and the eeprom controller timeout (epc_timeout) bit in the eeprom command register (e2p_cmd) is set. note that this is a total timeout value and not the timeout for any one portion of the sequence. 8.3.7 i 2 c master eeprom c ontroller operation i 2 c master eeprom operations are performed using the eeprom command register (e2p_cmd) and eeprom data register (e2p_data) . the following operations are supported: ? read (read location) ? write (write location) ? reload (eeprom loader reload - see section 8.4, "eeprom loader" ) note: the eeprom loader uses the read command only. the supported commands are detailed in section 13.2.3.1, "eeprom command register (e2p_cmd)," on page 151 . details specific to each operational mode are explained in section 8.2, "i2c overview" and section 8.4, "eeprom loader" , respectively. when issuing a write command, the desired data must first be written into the eeprom data register (e2p_data) . the write command may then be issued by setting the eeprom controller command (epc_command) field of the eeprom command register (e2p_cmd) to the desired command value. if the operation is a write, the eeprom controller address (epc_address) field in the eeprom command register (e2p_cmd) must also be set to the desired location. the command is executed when the eeprom controller busy (epc_busy) bit of the eeprom command register (e2p_cmd) is set. the completion of the operation is indicated when the eeprom controller busy (epc_busy) bit is cleared. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 114 smsc lan9303/lan9303i datasheet when issuing a read command, the eeprom controller co mmand (epc_command) and eeprom controller a ddress (epc_address) fields of the eeprom command register (e2p_cmd) must be configured with the desired command value and the read address, respectively. the read command is executed by setting the eeprom controller busy (epc_busy) bit of the eeprom command register (e2p_cmd) . the completion of the operation is indicated when the eeprom controller busy (epc_busy) bit is cleared, at which time the data from the eeprom may be read from the eeprom data register (e2p_data) . the reload operation is performed by writing the reload command into the eeprom controller command (epc_command) field of the eeprom command register (e2p_cmd) . the command is executed by setting the eeprom controller busy (epc_busy) bit of the eeprom command register (e2p_cmd) . in all cases, the software must wait for the eeprom controller busy (epc_busy) bit to clear before modifying the eeprom command register (e2p_cmd) . if an operation is attempted and the eeprom device does not respond within 30ms, the device will time-out, and the eeprom controller timeout (epc_timeout) bit of the eeprom command register (e2p_cmd) will be set. figure 8.6 illustrates the process required to perfo rm an eeprom read or write operation. figure 8.6 eeprom ac cess flow diagram eeprom write idle write e2p_data register write e2p_cmd register read e2p_cmd register epc_busy = 0 eeprom read idle write e2p_cmd register read e2p_cmd register read e2p_data register epc_busy = 0 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 115 revision 1.5 (07-08-11) datasheet 8.4 eeprom loader the eeprom loader interfaces to the i 2 c eeprom controller, the phys, and to the system csrs (via the register access mux). all system csrs are accessible to the eeprom loader. the eeprom loader runs upon a pin reset (nrst), power-on reset (por), digital reset ( digital reset (digital_rst) bit in the reset control register (reset_ctl) ), or upon the issuance of a reload command via the eeprom command register (e2p_cmd) . refer to section 4.2, "resets," on page 42 for additional information on resets. the eeprom contents must be load ed in a specific format for use with the eeprom loader. an overview of the eeprom content format is shown in ta b l e 8 . 2 . each section of eeprom contents is discussed in detail in the following sections. 8.4.1 eeprom loa der operation upon a pin reset (nrst), power-o n reset (por), digital reset ( digital reset (digital_rst) bit in the reset control register (reset_ctl) ), or upon the issuance of a reload command via the eeprom command register (e2p_cmd) , the eeprom controller busy (epc_busy) bit in the eeprom command regi ster (e2p_cmd) will be set. while the eeprom loader is active, the device ready (ready) bit of the hardware configuration register (hw_cfg) is cleared and no writes to the device should be attempted. the operational flow of the eeprom loader can be seen in figure 8.7 . table 8.2 eeprom contents format overview eeprom address description value 0 eeprom valid flag a5h 1 mac address low word [7:0] 1 st byte on the network 2 mac address low word [15:8] 2 nd byte on the network 3 mac address low word [23:16] 3 rd byte on the network 4 mac address low word [31:24] 4 th byte on the network 5 mac address high word [7:0] 5 th byte on the network 6 mac address high word [15:8] 6 th byte on the network 7 configuration strap values valid flag a5h 8 - 11 configuration strap values see table 8.3 12 burst sequence valid flag a5h 13 number of bursts see section 8.4.5, "register data" 14 and above burst data see section 8.4.5, "register data" downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 116 smsc lan9303/lan9303i datasheet figure 8.7 eeprom load er flow diagram byte 0 = a5h n digital_rst, nrst, por, reload n y epc_busy = 1 read byte 0 read bytes 1-6 write bytes 1-6 into switch mac address registers read byte 7-11 byte 7 = a5h y write bytes 8-11 into configuration strap registers update phy registers update vphy registers update registers: led_cfg, manual_fc_1, manual_fc_2 and manual_fc_0 read byte 12 byte 12 = a5h do register data loop y load phy registers with current straps load phy registers with current straps n epc_busy = 0 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 117 revision 1.5 (07-08-11) datasheet 8.4.2 eeprom valid flag following the release of nrst, por, digital_rst, or a reload command, the eeprom loader starts by reading the first byte of data from the eep rom. if the value of a5h is not read from the first byte, the eeprom loader will load the current configuration strap values into the phy registers (see section 8.4.4.1 ) and then terminate, clearing the eeprom controller busy (epc_busy) bit in the eeprom command register (e2p_cmd) . otherwise, the eeprom load er will continue reading sequential bytes from the eeprom. 8.4.3 mac address the next six bytes in the eeprom, after the eeprom valid flag, are written into the switch fabric mac address high register (switch_mac_addrh) and switch fabric mac address low register (switch_mac_addrl) . the eeprom bytes are written into the mac address registers in the order specified in table 8.2 . 8.4.4 soft-straps the 7 th byte of data to be read from the eeprom is the configuration strap values valid flag. if this byte has a value of a5h, the next 4 bytes of data (8-11) are written into the configuration strap registers per the assignments detailed in table 8.3 . if the flag byte is not a5h, these next 4 bytes are skipped (they are still read to maintain the data burst, but are discarded). however, the current configuration strap values are still loaded into the phy registers (see section 8.4.4.1 ). refer to section 4.2.4, "configuration straps," on page 46 for more information on configuration straps. 8.4.4.1 phy registers synchronization some phy register defaults are based on configuration straps. in order to maintain consistency between the updated configuration strap registers and the phy registers, the port x phy auto- negotiation advertisement register (phy_an_adv_x) , port x phy special modes register (phy_special_modes_x) , and port x phy basic control register (phy_basic_control_x) are written when the eeprom loader is run. the port x phy auto-negotiation advertisement register (phy_an_adv_x) is written with the new defaults as detailed in section 13.3.2.5, "port x phy auto-negotiation advertisement register (phy_an_adv_x)," on page 202 . the port x phy special modes register (phy_special_modes_x) is written with the new defaults as detailed in section 13.3.2.9, "port x phy special modes register (phy_special_modes_x)," on page 209 . the port x phy basic control regi ster (phy_basic_control_x) is written with the new defaults as detailed in section 13.3.2.1, "port x phy basic control register (phy_basic_control_x)," on table 8.3 eeprom configuration bits b y t e / b i t765 4 321 0 byte 8 bp_en_ strap_1 fd_fc_ strap_1 manual_ fc_strap_1 manual_mdix _strap_1 auto_mdix_ strap_1 speed_ strap_1 duplex_ strap_1 autoneg_ strap_1 byte 9 bp_en_ strap_2 fd_fc_ strap_2 manual_ fc_strap_2 manual_mdix _strap_2 auto_mdix_ strap_2 speed_ strap_2 duplex_ strap_2 autoneg_ strap_2 byte 10 unused bp_en_ strap_0 fd_fc_ strap_0 manual_fc _strap_0 speed_ strap_0 duplex_pol_ strap_0 sqe_test_ disable_strap _0 byte 11 led_fun_strap[1:0] led_en_strap[5:0] downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 118 smsc lan9303/lan9303i datasheet page 196 . additionally, the restart auto-negotiation (phy_rst_an) bit is set in these registers. this re-runs the auto-negotiation using the new default values of the port x phy auto-negotiation advertisement register (phy_an_adv_x) register to determine the new auto-negotiation results. note: each of these phy registers is written in its entirety, overwriting any previously changed bits. following the writes to the phy registers, the pm i registers are reset back to their default values. 8.4.4.2 virtual phy re gisters synchronization some phy register defaults are based on configuration straps. in order to maintain consistency between the updated configuration strap registers and the virtual phy registers, the virtual phy auto- negotiation advertisement register (vphy_an_adv) , virtual phy special control/status register (vphy_special_control_status) , and virtual phy basic control register (vphy_basic_ctrl) are written when the eeprom loader is run. the virtual phy auto-negotiation advertisement register (vphy_an_adv) is written with the new defaults as detailed in section 13.2.6.5, "virtual phy au to-negotiation advertisement register (vphy_an_adv)," on page 179 . the virtual phy special control/status r egister (vphy_specia l_control_status) is written with the new defaults as detailed in section 13.2.6.8, "virtual phy special control/status register (vphy_special_control_status)," on page 185 . the virtual phy basic control register (vphy_basic_ctrl) is written with the new defaults as detailed in section 13.2.6.1, "virtual phy basic control register (vphy_basic_ctrl)," on page 173 . additionally, the restart auto-negotiation (phy_rst_an) bit is set in this register. this re-runs the auto-negotiation using the new default values of the virtual phy auto-negotiation advertisement register (vphy_an_adv) register to determine the new auto-negotiation results. note: each of these vphy registers is written in its entirety, overwriting any previously changed bits. 8.4.4.3 led and manual flow co ntrol register synchronization since the defaults of the led configuration register (led_cfg) , port 1 manual flow control register (manual_fc_1) , port 2 manual flow control register (manual_fc_2) , and port 0 manual flow control register (manual_fc_0) are based on configuration straps, the eeprom loader reloads these registers with their new default values. 8.4.5 register data optionally following the configuration strap val ues, the eeprom data may be formatted to allow access to the devices parallel, directly writable regist ers. access to indirectly accessible registers (e.g. switch engine registers, etc.) is achievable wi th an appropriate sequence of writes (at the cost of eeprom space). this data is first preceded with a burst sequence va lid flag (eeprom byte 12). if this byte has a value of a5h, the data that follows is recogniz ed as a sequence of bursts. otherwise, the eeprom loader is finished, will go into a wait state, and clear the eeprom controller busy (epc_busy) bit in the eeprom command register (e2p_cmd) . this can optionally generate an interrupt. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 119 revision 1.5 (07-08-11) datasheet the data at eeprom byte 13 and above should be formatted in a sequence of bursts. the first byte is the total number of bursts. following this is a se ries of bursts, each consisting of a starting address, count, and the count x 4 bytes of data. this results in the following formula for formatting register data: 8-bits number_of_bursts repeat (number_of_bursts) 16-bits {starting_address[9:2] / count[7:0]} repeat (count) 8-bits data[31:24], 8-bits data[23:16], 8-bits data[15:8], 8-bits data[7:0] note: the starting address is a dword address. appending two 0 bits will form the register address. as an example, the following is a 3 burst sequence , with 1, 2, and 3 dwords starting at register addresses 40h, 80h, and c0h respectively: a5h, (burst sequence valid flag) 3h, (number_of_bursts) 16{10h, 1h}, (starting_address1 divided by 4 / count1) 11h, 12h, 13h, 14h, (4 x count1 of data) 16{20h, 2h}, (starting_address2 divided by 4 / count2) 21h, 22h, 23h, 24h, 25h, 26h, 27h, 28h, (4 x count2 of data) 16{30h, 3h}, (starting_address3 divided by 4 / count3) 31h, 32h, 33h, 34h, 35h, 36h, 37 h, 38h, 39h, 3ah, 3bh, 3ch (4 x count3 of data) in order to avoid overwriting the switch csr register interface or the phy management interface (pmi), the eeprom loader waits until the csr busy (csr_busy) bit of the switch fabric csr interface command register (switch_csr_cmd) and the mii busy (miibzy) bit of the phy management interface access register (pmi_access) are cleared before performing any register write. the eeprom loader checks that the eeprom address sp ace is not exceeded. if so, it will stop and set the eeprom loader address overflow (loader_overflow) bit in the eeprom command register (e2p_cmd) . the address limit is based on the eeprom_size_strap which specifies a range of sizes. the address limit is set to the largest value of the specified range. 8.4.6 eeprom loader fi nished wait-state once finished with the last burst, the eepr om loader will go into a wait-state and the eeprom controller busy (epc_busy) bit of the eeprom command register (e2p_cmd) will be cleared. 8.4.7 reset sequence and eeprom loader in order to allow the eeprom loader to change t he port 1/2 phys and virtual phy strap inputs and maintain consistency with the phy and virtual ph y registers, the following sequence is used: 1. after power-up or upon a hardware reset (nrst), the straps are sampled into the device as specified in section 14.5.2, "reset and configuration strap timing," on page 355 . 2. after the pll is stable, the main chip reset is released and the eeprom loader reads the eeprom and configures (overrides) the strap inputs. 3. the eeprom loader writes select port 1/2 and virtual phy regist ers, as specified in section 8.4.4.1 and section 8.4.4.2 , respectively. note: step 3 is also performed in the case of a reload command or digital reset. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 120 smsc lan9303/lan9303i datasheet 8.5 i 2 c slave operation when in mac/phy i 2 c managed mode, the i 2 c slave interface is used for cpu management of the device. all system csrs are accessible to the cpu in these modes. i 2 c mode is selected when the mngt_mode_strap[1:0] configuration straps are set to 10b, respectively. the i 2 c slave controller implements the low level i 2 c slave serial interface (start and stop condition detection, data bit transmission and reception, and acknowledge gener ation and reception), handles the slave command protocol, and pe rforms system register reads and writes. the i 2 c slave controller conforms to the nxp i 2 c-bus specification . the i 2 c slave serial interface consists of a data wire (sda) and a serial clock (scl). the serial clock is driven by the master, while the data wire is bi -directional. both signals are open-drain and require external pull-up resistors. the i 2 c slave serial interface supports the standard-mode speed of up to 100khz and the fast-mode speed of 400khz. refer to the nxp i 2 c-bus specification for detailed i 2 c timing information. 8.5.1 i 2 c slave command format the i 2 c slave serial interface supports single register and multiple register read and write commands. a read or write command is started by the master fi rst sending a start condition, followed by a control byte. the control byte consists of a 7-bit slave address and a 1-bit read/write indication (r/~w). the slave address used by the device is 0001010b, written as sa6 (first bit on the wire) through sa0 (last bit on the wire). assuming the slave address in the control byte matches this address, the control byte is acknowledged by the device. otherwise, the entire sequence is ignored until the next start condition. the i 2 c command format can be seen in figure 8.8 . if the read/write indication (r/~w) in the control byte is a 0 (indicating a potential write), the next byte sent by the master is the register address. after the address byte is acknowledged by the device, the master may either send data bytes to be written, or it may send another start condition (to start the reading of data), or a stop condition. the latter two will terminate the current write (without writing any data), but will have the affect of setting the internal register address which will be used for subsequent reads. if the read/write indication in the control byte is a 1 (indicating a read), the device will start sending data following the control byte acknowledgement. note: all registers are accessed as dwords. appending two 0 bits to the address field will form the register address. addresses and data are transferred msb first. data is transferred msb first (little endian). 8.5.2 i 2 c slave read sequence following the device addressing, as detailed in section 8.5.1 , a register is read from the device when the master sends a start condition and control byte with the r/~w bit set. assuming the slave address in the control byte matches the device address, the control byte is acknowledged by the device. figure 8.8 i 2 c slave addressing s sa 2 sa 1 sa 0 0 r/~w control byte a 7 a 6 a 5 a 4 a 3 a 2 a c k a c k address byte sa 6 sa 5 sa 4 sa 3 * start or stop or data [31] a 9 a 8 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 121 revision 1.5 (07-08-11) datasheet otherwise, the entire sequence is ignored until the next start condition. following the acknowledge, the device sends 4 bytes of data. the first 3 bytes are acknowledged by the master and on the fourth, the master sends a no-acknowledge followed by the stop condition. the no-acknowledge informs the device not to send the next 4 bytes (as it would in the case of a multiple read). the internal register address is unchanged following the single read. multiple reads are performed when the master sends an acknowledge on the fourth byte. the internal address is incremented and the next register is shifted out. once the internal address reaches its maximum, it rolls over to 0. the multiple read is concluded when the master sends a no-acknowledge followed by a stop condition. the no-acknowledge informs the device not to send the next 4 bytes. the internal register address in incremented for each read including the final. for both single and multiple reads, in the case that the master sends a no-acknowledge on any of the first three bytes of the register, the device will stop sending subsequent bytes. if the master sends an unexpected start or stop condition, the device will stop sending immediately and will respond to the next sequence as needed. since data is read serially, register values are latched (registered) at the beginning of each 32-bit read to prevent the host from reading an intermediate value. the latching occurs multiple times in a multiple read sequence. in addition, any register that is af fected by a read operation (e.g. a clear on read bit) is not cleared until after all 32-bits are output. in the event that 32-bits are not read (master sends a no-acknowledge on one of the first three bytes or a start or stop condition occurs unexpectedly), the read is considered invalid and the register is no t affected. multiple registers may be cleared in a multiple read cycle, each one be ing cleared as it is read. i 2 c reads from unused register addresses return all zeros. figure 8.9 illustrates a typical single and multiple register read. 8.5.2.1 i 2 c slave read polling for reset complete during reset, the i 2 c slave interface will not return valid data. to determine when the reset condition is complete, the byte order test register (byte_test) should be polled. once the correct pattern is read, the interface can be considered functional. at this point, the device ready (ready) bit in the hardware configuration register (hw_cfg) can be polled to determine when the device initialization is complete. refer to section 4.2, "resets," on page 42 for additional information. 8.5.3 i 2 c slave write sequence following the device addressing, as detailed in section 8.5.1 , a register is written to the device when the master continues to send data bytes. each byte is acknowledged by the device. following the fourth byte of the sequence, the master may eit her send another start condition or halt the sequence with a stop condition. the internal register address is unchanged following a single write. figure 8.9 i 2 c slave reads multiple register reads s control byte a c k single register read 1 d 5 d 4 d 3 d 2 d 1 d 0 a c k p sa 2 sa 1 sa 0 sa 6 sa 5 sa 4 sa 3 a c k d 31 d 30 d 29 d 28 s 27 d 26 d 25 d 24 d 23 d 22 s a c k 1 sa 2 sa 1 sa 0 sa 6 sa 5 sa 4 sa 3 a c k d 31 d 30 d 25 d 24 data byte... d 21 d 20 data byte data 1 byte d 4 d 3 d 2 d 1 d 0 a c k p d 4 d 3 d 2 d 1 d 0 a c k d 31 d 30 d 29 d 28 d 27 d 26 s sa 2 sa 1 sa 0 0 a 7 a 6 a 5 a 4 a 3 a 2 a c k a c k address byte sa 6 sa 5 sa 4 sa 3 a 9 a 8 s sa 2 sa 1 sa 0 0 control byte a 7 a 6 a 5 a 4 a 3 a 2 a c k a c k address byte sa 6 sa 5 sa 4 sa 3 a 9 a 8 r/~w r/~w .. . .. .. . .. . . control byte control byte ...data byte ...data m byte data m+1 byte... ...data n byte downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 122 smsc lan9303/lan9303i datasheet multiple writes are performed when the master sends additional bytes following the fourth acknowledge. the internal address is automatically incremented and the next register is written. once the internal address reaches it maximum value, it rolls over to 0. the multiple write is concluded when the master sends another start condition or stop condition. the internal register address is incremented for each write including the final. this is not relevant for subsequent writes, since a new register address would be included on a new write cycle. however, this does affect the internal register address if it were to be used for reads withou t first resetting the register address. for both single and multiple writes, if the master sends an unexpected start or stop condition, the device will stop immediately and will respond to the next sequence as needed. the data write to the register occurs after the 32-bits are input. in the event that 32-bits are not written (master sends a start, or a stop condition occurs un expectedly), the write is considered invalid and the register is not affected. multiple registers may be written in a multiple write cycle, each one being written after 32-bits. i 2 c writes must not be performed to unused register addresses. figure 8.10 illustrates a typical single and multiple register write. figure 8.10 i 2 c slave writes multiple register writes single register write a c k d 5 d 4 d 3 d 2 d 1 d 0 p d 31 d 30 d 29 d 28 s 27 d 26 d 25 d 24 d 23 d 22 d 21 d 20 data byte a c k a c k a c k d 31 d 30 d 25 d 24 d 5 d 4 d 3 d 2 d 1 d 0 p d 5 d 4 d 3 d 2 d 1 d 0 a c k d 31 d 30 d 29 d 28 d 27 d 26 d 25 a c k a c k s sa 2 sa 1 sa 0 0 a 7 a 6 a 5 a 4 a 3 a 2 a c k address byte sa 6 sa 5 sa 4 sa 3 a 9 a 8 s sa 2 sa 1 sa 0 0 a 7 a 6 a 5 a 4 a 3 a 2 a c k address byte sa 6 sa 5 sa 4 sa 3 a 9 a 8 control byte control byte data 1 byte .. .. . . ...data m byte data m+1 byte... .. . ...data n byte .. . ...data byte data byte... downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 123 revision 1.5 (07-08-11) datasheet chapter 9 mii data interface 9.1 port 0 mii data path the mii data path is used to connect the switch engine port to the external mii pins, to emulate an rmii/mii phy, and to select between phy and mac modes. 9.1.1 port 0 mii mac mode when operating in mii mac mode, the switch fabric mac output signals are routed directly to the devices mii output pins (p0_outd[3:0] and p0_outdv). the switch fabric mac inputs are sourced from the mii input pins (p0_ind[3:0], p0_indv , p0_iner, p0_col, p0_crs, p0_outclk, and p0_inclk). mii mac mode can operate at up to 200mbps. 9.1.2 port 0 mii phy mode when operating in mii phy mode, the mii data pa th supplies the rx and tx clocks, creates the crs and col signals and optionally loops back the mii or switch engines transmissions. it also provides the collision test function for the external mii pins or switch engine. mii phy mode can operate at up to 200mbps (turbo mode). the mii pins p0_inclk, p0_outclk, p0_col, and p0_crs, which are inputs when in mii mac mode, are outputs when in mii phy mode. when in mii phy mode, if the isolate (vphy_iso) bit of the virtual phy basic control register (vphy_basic_ctrl) is set, mii data path output pins are three-stated, the pull-ups and pull-downs are disabled and the mii data path input pins are ignored (disabled into the non-active state and powered down). note that setting the isolate (vphy_iso) bit does not cause isolation of the mii management pins and does not affect mii mac mode. 9.1.2.1 turbo operation turbo (200mbps) operation is facilitated in mii phy mode via the turbo mii enable bit of the virtual phy special control/status regi ster (vphy_special_control_status) . when set, this bit changes the data rate of the mii phy from 100mbps to 200mbps. the speed select lsb (vphy_speed_sel_lsb) bit of the virtual phy basic control register (vphy_basic_ctrl) toggles between 10 and 200 mbps operation when turbo mii enable is set. 9.1.2.2 clock drive strength when operating at 200mbps (turbo mode), the drive strength of p0_inclk and p0_outclk pins is selected based on the setting of the rmii/turbo mii clock strength bit of the virtual phy special control/status register ( vphy_special_control_status) . a low selects 12ma, a high selects 16ma. when operating at 10 or 100mbps, the drive strength is fixed at 12ma. 9.1.2.3 signal quality e rror (sqe) heartbeat test the sqe_heartbeat signal, observable on the p0 _col pin, is generated in 10mbit half duplex mode in response to a transmission from the external mac. at 0.6us to 1.6us (1.0us nominal) following the de-assertion of p0_indv, sqe_heartbeat is set active for 0.5us to 1.5us (5 to 15 bit times) (1.0us nominal). this test is disabled via the sqeoff bit of the virtual phy special control/status register (v phy_special_control_status) . downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 124 smsc lan9303/lan9303i datasheet 9.1.2.4 collision test two forms of collision testing are available: extern al mac collision testing and switch engine collision testing. external mac collision testing is enabled when the collision test (vphy_col_test) bit of the virtual phy basic control regi ster (vphy_basic_ctrl) is set. in this test mode, any transmissions from the external mac will result in collision signaling to the external mac via the p0_col pin. switch engine collision testing is enabled when the switch collision test port 0 bit of the virtual phy special control/status register (vphy_special_control_status) is set. in this test mode, any transmissions from the switch engine will result in the assertion of the internal collision signal to the switch fabric port 0. switch engine collision testing occurs regardless of the setting of the isolate (vphy_iso) bit. 9.1.2.5 loopback two forms of loopback testing are available: external mac loopback and switch engine loopback. external mac loopback is enabled when the loopback (vphy_loopback) bit of the virtual phy basic control regist er (vphy_basic_ctrl) is set. transmissions from the external mac are not sent to the switch engine and are not used for purposes of signaling data valid, collision or carrier sense to the switch engine. instead, they are looped back onto the receive path. transmissions from the switch engine are ignored and are not used for purposes of signaling data valid, collision or carrier sense on the mii pins. the collision output to the external mac (via p0_col) is not generated unless the collision test (vphy_col_test) bit is set. the sqe_heartbeat signal does not drive the collision output (via p0_col) during external mac loopback but can drive it during switch engine loopback. the carrier sense output on the p0_crs pin is only based on the transmit enable from the external mac (via the p0_indv pin). switch engine loopback is enabled when the switch looopback port 0 bit of the virtual phy special control/status register ( vphy_special_control_status) is set. transmissions from the switch engine are not sent to the external mac and are not used for purposes of signaling data valid, collision or carrier sense to the mii pins. instead, they are looped back internally onto the receive path. transmissions from the external mac are ignored and are not used for purposes of data valid, collision or carrier sense to the switch engine. the collision signal to the switch engine is not generated unless the switch collision test port 0 bit is set. the carrier sense signal is only based on the transmit enable from the switch engine. switch engine loopbac k occurs regardless of the setting of the isolate (vphy_iso) bit. 9.1.3 port 0 rmii phy mode port 0 rmii phy mode is used when interfacing port 0 to an external mac that does not support the full mii interface. the rmii interface uses a subset of the mii pins. the p0_outd[1:0], p0_outdv, p0_ind[1:0], p0_indv, and p0_outclk pins are the only mii pins used to communicate with the external mac in this mode. this mode provides collision testing for the switch engine, as well as loopback test capabilities. note: the rmii standard does not support external mac collision testing. when in rmii phy mode, if the isolate (vphy_iso) bit of the virtual phy basic control register (vphy_basic_ctrl) is set, mii data path output pins are three-stated, the pull-ups and pull-downs are disabled and the mii data path input pins are ignored (disabled into the non-active state and powered down). note that setting the isolate (vphy_iso) bit does not cause isolation of the mii management pins and does not affect mii mac mode. 9.1.3.1 reference clock selection the 50mhz rmii reference clock can be selected from either the p0_outclk pin input or the internal 50mhz clock. the choice is based on the setting of the rmii clock direction bit of the virtual phy downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 125 revision 1.5 (07-08-11) datasheet special control/status register (vphy_special_control_status) . a low selects p0_outclk and a high selects the internal 50mhz clock. the high setting also enables p0_outclk as an output to be used as the system reference clock. 9.1.3.2 clock drive strength when p0_outclk is configured as an output via the rmii clock direction bit of the virtual phy special control/status register (vphy_special_control_status) , its drive strength is based on the setting of the rmii/turbo mii clock strength bit of the virtual phy special control/status register (vphy_special_control_status) . a low selects 12ma, a high selects 16ma. 9.1.3.3 signal quality e rror (sqe) heartbeat test the sqe_heartbeat signal is not generated when operating in rmii phy mode. the sqeoff bit of the virtual phy special control/status re gister (vphy_special_control_status) has no effect when operating in rmii phy mode. 9.1.3.4 collision test external mac collision testing is not available when operating in the rmii phy mode. the collision test (vphy_col_test) bit of the virtual phy basic control re gister (vphy_basic_ctrl) has no effect on system operation in rmii phy mode. switch engine collision testing is available and is enabled when the switch collision test port 0 bit of the virtual phy special control/status register (vphy_special_control_status) is set. in this test mode, any transmissions from the switch engine wi ll result in the assertion of an internal collision signal to the switch fabric port 0. switch engine collision test occurs regardless of the setting of the isolate (vphy_iso) bit. 9.1.3.5 loopback mode two forms of loopback testing are available: external mac loopback and switch engine loopback. external mac loopback is enabled when the loopback (vphy_loopback) bit of the virtual phy basic control regist er (vphy_basic_ctrl) is set. transmissions from the external mac are not sent to the switch engine. instead, they are looped back onto the receive path. transmissions from the switch engine are ignored. switch engine loopback is enabled when the switch looopback port 0 bit of the virtual phy special control/status register ( vphy_special_control_status) is set. transmissions from the switch engine are not sent to the external mac. instead, they are looped back internally onto the receive path. transmissions from the external mac are ignored. an internal collision signal to the switch engine is available and is asserted when the switch collision test port 0 bit is set. switch engine loopback occurs regardless of the setting of the isolate (vphy_iso) bit. . downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 126 smsc lan9303/lan9303i datasheet chapter 10 mii management 10.1 functional overview this chapter details the mii management functionality provided by the device, which includes the smi slave controller , phy management interface (pmi) , and the mii mode multiplexer . the smi slave controller is used for cpu management of the device via the mii pins, and allows cpu access to all system csrs. the phy management interface (pmi) is used to access the internal phys and optional external phy, dependant on the management mode. the pmi implements the ieee 802.3 management protocol. the mii mode multiplexer is used to direct the connections of the mii data path and mii management path based on the selected mode of the device. 10.2 smi slave controller the smi slave controller uses the same pins and protocol as the ieee 802. 3 mii management function, and differs only in that smi provides access to a ll internal registers by using a non-standard extended addressing map. the smi protocol co-exists with the mii management protocol by using the upper half of the phy address space (16 through 31). all direct and indirect registers can be accessed. the smi management mode is selected when the mngt_mode_strap[1:0] inputs are set to 01b. a list of management modes and their configuration settings are discussed in section 2.3, "modes of operation," on page 19 . the mii management protocol is limited to 16-bit data accesses. the protocol is also limited to 5 phy address bits and 5 register address bits. the smi frame format can be seen in table 10.1 . the device uses the phy address field bits 3:0 as the system r egister address bits 9:6, and the regist er address field as the system register address bits 5:1. theref ore, register address field bit 0 is used as the upper/lower word select. the device requires two back-to-b ack accesses to each register (with alternate settings of register address field bit 0) which are combined to form a 32-bit access. the access may be performed in any order. note: when accessing the device, the pair of cycles must be atomic. in this case, the first host smi cycle is performed to the low/ high word and the second hos t smi cycle is performed to the high/low word, forming a 32-bit transaction with no cycles to the device in between. with the exception of register address field bit 0, all address and control bits must be the same for both 16-bit cycles of a 32-bit transaction. input data on the mdio pin is sampled on the rising edge of the mdc input clock. output data is sourced on the mdio pin with the rising edge of the clock. the mdio pin is three-stated unless actively driving read data. a read or a write is performed using the frame format shown in table 10.1 . all addresses and data are transferred msb first. data bytes are transferred li ttle endian. when register address bit 0 is 1, bytes downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 127 revision 1.5 (07-08-11) datasheet 3 & 2 are selected with byte 3 occurring first. w hen register address bit 0 is 0, bytes 1 & 0 are selected with byte 1 occurring first. note 10.1 phy address bit 4 is 1 for smi commands. ph y address 3:0 form syst em register address bits 9:6. the register address field fo rms the system register address bits 5:1 note 10.2 the turn-around time (ta) is used to avoid contention during a read cycle. for a read, the device drives the second bit of the turn-around time to 0, and then drives the msb of the read data in the following clock cycle. for a write, the external host drives the first bit of the turn-around time to 1, the second bit of the turn-around time to 0, and then the msb of the write data in the following clock cycle. note 10.3 in the idle condition, the mdio output is three-stated and pulled high externally. note: the smi interface supports up to a 2.5mhz input clock. the mii/smi timing adheres to the ieee 802.3 specification. refer to the ieee 802.3 specification for detailed mii timing information. 10.2.1 read sequence in a read sequence, the host sends the 32-bit preamble, 2-bit start of frame, 2-bit op-code, 5-bit phy address, and the 5-bit register address. the next clock is the first bit of the turnaround time in which the device continues to three-state mdio. on the next rising edge of mdc, the device drives mdio low. for the next 16 rising edges, the device drives the output data. on the final clock, the device once again three-states mdio. the host processor is required to perform two consecutive 16-bit reads to complete a single dword transfer. no ordering requirements exist. the processor can access either the low or high word first, as long as the next read is performed from the othe r word. if a read to the same word is performed, the combined data read pair is invalid and should be re-read. this is not a fatal error. the device will simply reset the read counters, and restart a new cycle on the next read. note: select registers are readable as 16-bit register s, as noted in their register descriptions. for these registers, only one 16-bit read may be performed without the need to read the other word. register values are latched (registered) at the beginning of each 16-bit read to prevent the host from reading an intermediate value. in addition, any register that is affected by a read operation, such as a clear on read bit, is not cleared until after the end of the second read. in the event that 32-bits are not read, the read in considered invalid and the register is not affected. any register that may change between two consecutive host read cycles and spans across two words, such as a counter, is latched (registered) at the beginning of the first read and held until after the second read has completed. this prevents the host from reading inconsistent data from the first and second half of a register. for example, if a counters value is 01ffh, the first half will be read as table 10.1 smi frame format preamble start op code phy address note 10.1 register address note 10.1 turn- around time note 10.2 data idle note 10.3 read 32 1s 01 10 1aaaa 9876 aaaaa 54321 z0 dddddddddddddddd 11111 10000000000 5432109876543210 z write 32 1s 01 01 1aaaa 9876 aaaaa 54321 10 dddddddddddddddd 11111 10000000000 5432109876543210 z downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 128 smsc lan9303/lan9303i datasheet 01h. if the counter then changes to 0200h, the host would read 00h, resulting an the incorrect value of 0100h instead of either 01ffh or 0200h. note: smi reads from unused register addresses retu rn all zeros. this differs from unused phy registers which leave mdio un-driven. 10.2.1.1 smi read polling for reset complete during reset, the smi slave interface will not return valid data. to determine when the reset condition is complete, the byte order test register (byte_test) should be polled. once the correct pattern is read, the interface can be considered functional. at this point, the device ready (ready) bit in the hardware configuration register (hw_cfg) can be polled to determine when the device initialization is complete. refer to section 4.2, "resets," on page 42 for additional information. note: in the event that a reset condition terminates between halves of 16-bit read pair, the device will not expect another 16-bit read to complete the dword cycle. only specific registers may be read during a reset. refer to section 4.2, "resets," on page 42 for additional information. 10.2.2 write sequence in a write sequence, the host sends the 32-bit preamb le, 2-bit start of frame, 2-bit op-code, 5-bit phy address, 5-bit register address, 2-bit turn-around time, and finally the 16-bits of data. the mdio pin is three-stated throughout the write sequence. the host processor is required to perform two contiguous 16-bit writes to complete a single dword transfer. no ordering requirement exists. the host may access either the low or high word first, as long as the next write is performed to the opposite word. if a write to the same word is performed, the device disregards the transfer. note: smi writes must not be performed to unused register addresses. 10.3 phy manageme nt interface (pmi) the phy management interface (pmi) is used to access the internal phys as well as the external phy on the mii pins (in mac modes only). the pmi operates at 2.5mhz, and implements the ieee 802.3 management protocol, providing read/ write commands for phy configuration. a read or write is performed using the frame format shown in table 10.2 . all addresses and data are transferred msb first. data bytes are transferred little endian. note 10.4 the turn-around time (ta) is used to avoi d bus contention during a read cycle. for a read, the external phy drives the second bit of the turn-around time to 0, and then drives the msb of the read data in the foll owing cycle. for a write, the device drives the first bit of the turnaround time to 1, the second bit of the turnaround time to 0, and then the msb of the write data in th e following clock cycle. note 10.5 in the idle condition, the mdio output is three-stated and pulled high externally. table 10.2 mii management frame format preamble start op code phy address register address turn- around time note 10.4 data idle note 10.5 read 32 1s 01 10 aaaaa rrrrr z0 dddddddddddddddd z write 32 1s 01 01 aaaaa rrrrr 10 dddddddddddddddd z downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 129 revision 1.5 (07-08-11) datasheet the internal phys and optional external phy (in mac modes) are accessed via the phy management interface access register (pmi_access) and phy management interface data register (pmi_data) . these registers allow read and write operations to all phy registers. refer to section 13.2.5, "phy management interface (pmi)," on page 170 for detailed information on these registers. 10.3.1 eeprom loader ph y register access the pmi is also used by the eeprom loader to load the phy registers with various configuration strap values. the phy management interface access register (pmi_access) and phy management interface data register (pmi_data) are also accessible as part of the register data burst sequence of the eeprom loader. refer to section 8.4, "eeprom loader," on page 115 for additional information. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 130 smsc lan9303/lan9303i datasheet 10.4 mii mode multiplexer the mii mode multiplexer is used to direct the mii data/management path connections. one master (mac via the mii pins, or pmi) is connected to the slaves (phy via mii pins, port 1/2 phys, virtual phy, and smi slave) dependant on the selected management mode of the device. the mii mode multiplexer also performs the multiplexing of the read data signals from the slaves and controls the output enable of the mii pins. the following sections detail the operation of the mii mode multiplexer in each management mode. a list of management modes and their configuration settings are discussed in section 2.3, "modes of operation," on page 19 . 10.4.1 port 0 mac mode smi managed in port 0 mac mode smi managed, the internal phys and smi slave block are accessed via the mii management pins. the virtual phy and pmi are not used in this mode. the virtual phy interface is accessible via the smi slave or the eeprom loader. refer to section 10.2, "smi slave controller," on page 126 and section 8.4, "eeprom loader," on page 115 for additional information. figure 10.1 details the mii multiplexer management path connections for this mode. figure 10.1 mii mux management path connections - mac mode smi managed smi slave mdi mdo mdio_ dir mdclk parallel master virtual phy mdi mdo mdio_ dir mdclk parallel slave phy2 mdi mdo mdio_ dir mdclk phy1 mdi mdo mdio_ dir mdclk management mode selection mii pins mdi mdo mdio_dir mdc_in mdc_ out mdc_dir management mode selection pmi mdi mdo mdclk parallel slave mdo_enn mdio mdc downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 131 revision 1.5 (07-08-11) datasheet 10.4.2 port 0 mac mode i 2 c managed in mac mode i 2 c managed, the internal phys and the external phy are accessed via the pmi. the smi slave and the virtual phy are not used in this mode. the virtual phy and pmi interfaces are accessible via the i 2 c slave interface or the eeprom loader. refer to section 8.4, "eeprom loader," on page 115 for additional information. figure 10.2 details the mii multiplexer management path connections for this mode. figure 10.2 mii mux management pa th connections - mac mode i 2 c managed smi slave mdi mdo mdio_ dir mdclk parallel master virtual phy mdi mdo mdio_ dir mdclk parallel slave phy2 mdi mdo mdio_ dir mdclk phy1 mdi mdo mdio_ dir mdclk management mode selection mii pins mdi mdo mdio_dir mdc_in mdc_ out mdc_dir management mode selection pmi mdi mdo mdclk parallel slave mdo_enn mdio mdc downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 132 smsc lan9303/lan9303i datasheet 10.4.3 port 0 phy mode smi managed in phy mode smi managed, the internal phys, virtual phy, and smi slave block are accessed via the mii management pins. the pmi is not used in this mode. the virtual phy interface is accessible via the smi slave or the eeprom loader. refer to section 10.2, "smi slave controller," on page 126 and section 8.4, "eeprom loader," on page 115 for additional information. figure 10.1 details the mii multiplexer management path connections for this mode. figure 10.3 mii mux management path connections - phy mode smi managed smi slave mdi mdo mdio_ dir mdclk parallel master virtual phy mdi mdo mdio_ dir mdclk parallel slave phy2 mdi mdo mdio_ dir mdclk phy1 mdi mdo mdio_ dir mdclk management mode selection mii pins mdi mdo mdio_dir mdc_in mdc_ out mdc_dir management mode selection pmi mdi mdo mdclk parallel slave mdo_enn mdio mdc downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 133 revision 1.5 (07-08-11) datasheet 10.4.4 port 0 phy mode i 2 c managed in phy mode i 2 c managed, the port 1/2 phys are accessed via the pmi, and the virtual phy is accessed via the external mii management pins . the smi slave is not used in this mode. the virtual phy and pmi parallel interfaces are accessible via the i 2 c slave interface or the eeprom loader. refer to section 8.4, "eeprom loader," on page 115 for additional information. figure 10.2 details the mii multiplexer management path connections for this mode. figure 10.4 mii mux management path connection s - phy mode i 2 c managed smi slave mdi mdo mdio_ dir mdclk parallel master virtual phy mdi mdo mdio_ dir mdclk parallel slave phy2 mdi mdo mdio_ dir mdclk phy1 mdi mdo mdio_ dir mdclk management mode selection mii pins mdi mdo mdio_dir mdc_in mdc_ out mdc_dir management mode selection pmi mdi mdo mdclk parallel slave mdo_enn mdio mdc downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 134 smsc lan9303/lan9303i datasheet chapter 11 general purpose timer & free-running clock this chapter details the general purpose timer (gpt) and the free-running clock. 11.1 general purpose timer the device provides a 16-bit pr ogrammable general purpose timer that can be used to generate periodic system interrupts. the resolution of this timer is 100us. the gpt loads the general purpose timer count register (gpt_cnt) with the value in the general purpose timer pre-load (gpt_load) field of the general purpose timer configuration register (gpt_cfg) when the general purpose timer enable (timer_en) bit of the general purpose timer configuration register (gpt_cfg) is asserted (1). on a chip-level reset, or when the general purpose timer enable (timer_en) bit changes from asserted (1) to de-asserted (0), the general purpose timer pre-load (gpt_load) field is initialized to ffffh. the general purpose timer count register (gpt_cnt) is also initialized to ffffh on reset. software can write a pre-load value into the general purpose timer pre-load (gpt_load) field at any time (e.g. before or after the general purpose timer enable (timer_en) bit is asserted). once enabled, the gpt counts down until it reaches 0000h, or until a new pre-load value is written to the general purpose timer pre-load (gpt_load) field. at 0000h, the counter wraps around to ffffh, asserts the gp timer (gpt_int) interrupt status bit in the interrupt status register (int_sts) , asserts the irq interrupt (if gp timer interrupt enable (gpt_int_en) is set in the interrupt status register (int_sts) ), and continues counting. gp timer (gpt_int) is a sticky bit. once this bit is asserted, it can only be cleared by writing a 1 to the bit. refer to section 5.2.4, "general purpose timer interrupt," on page 58 for additional information on the gpt interrupt. 11.2 free-running clock the free-running clock (frc) is a simple 32-bit up-counter that operates from a fixed 25mhz clock. the current frc value can be read via the free running 25mhz counter register (free_run) . on assertion of a chip-level reset, this counter is cleared to zero. on de-assertion of a reset, the counter is incremented once for every 25mhz clock cycle. when the maximum coun t has been reached, the counter rolls over to zeros. the frc does not generate interrupts. note: the free running counter can take up to 160ns to clear after a reset event. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 135 revision 1.5 (07-08-11) datasheet chapter 12 gpio/led controller 12.1 functional overview the gpio/led controller provides 6 configurable general purpose input/output pins, gpio[5:0]. these pins can be individually configured to function as inputs, push-pull outputs, or open drain outputs and each is capable of interrupt generation with configurab le polarity. alternatively, all 6 gpio pins can be configured as led outputs, enabling these pins to drive ethernet status leds for external indication of various attributes of the switch ports. gpio and led functionality is conf igured via the gpio/led system control and status registers (csrs). these registers are defined in section 13.2.2, "gpio/led," on page 147 . 12.2 gpio operation the gpio controller is comprised of 6 programmable input/output pins. these pins are individually configurable via the gpio csrs. on application of a chip-level reset: ? all gpios are set as inputs ( gpio direction 5-0 (gpdir[5:0]) cleared in general purpose i/o data & direction register (gpio_data_dir) ) ? all gpio interrupts are disabled ( gpio interrupt enable[5:0] (gpio[5:0]_int_en) cleared in general purpose i/o interrupt status and enable register (gpio_int_sts_en) ? all gpio interrupts are configur ed to low logic level triggering ( gpio interrupt polarity 5-0 (gpio_int_ pol[5:0]) cleared in general purpose i/o configuration register (gpio_cfg) ) note: gpio[5:0] may be configured as led outputs by default, dependant on the led_en_strap[5:0] configuration straps. refer to section 12.3, "led operation" for additional information. the direction and buffer type of all 6 gpios are configured via the general purpose i/o configuration register (gpio_cfg) and general purpose i/o data & direction register (gpio_data_dir) . the direction of each gpio, input or output, should be configured first via its respective gpio direction 5- 0 (gpdir[5:0]) bit in the general purpose i/o data & direction register (gpio_data_dir) . when configured as an output, the output buffer type for each gpio is selected by the gpio buffer type 5- 0 (gpiobuf[5:0]) bits in the general purpose i/o configuration register (gpio_cfg) . push/pull and open-drain output buffers are supported for each gpio. when functioning as an open-drain driver, the gpio output pin is driven low when the corresponding gpio data 5-0 (gpiod[5:0]) bit in the general purpose i/o data & direction register (gpio_data_dir) is cleared to 0, and is not driven when set to 1. when a gpio is enabled as a push/pull output, the value output to the gpio pin is set via the corresponding gpio data 5-0 (gpiod[5:0]) bit in the general purpose i/o data & direction register (gpio_data_dir) . for gpios configured as inputs, the corresponding gpio data 5-0 (gpiod[5:0]) bit reflects the current state of the gpio input. 12.2.1 gpio interrupts each gpio provides the ability to trigger a unique gpio interrupt in the general purpose i/o interrupt status and enable register (gpio_int_sts_en) . reading the gpio interrupt[5:0] (gpio[5:0]_int) bits of this register provides the current status of the corresponding interrupt, and each interrupt is enabled by setting the corresponding gpio interrupt enable[5: 0] (gpio[5:0]_int_en) bit. the gpio/led controller aggregates the enabled interrupt values into an internal signal that is sent to the system interrupt controller and is reflected via the interrupt status register (int_sts) gpio interrupt event (gpio) bit. for more information on interrupts, refer to chapter 5, "system interrupts," on page 55 . downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 136 smsc lan9303/lan9303i datasheet 12.2.1.1 gpio interrupt polarity the interrupt polarity can be set for each individual gpio via the gpio interrupt polarity 5-0 (gpio_int_pol[5:0]) bits in the general purpose i/o configuration register (gpio_cfg) . when set, a high logic level on the gpio pin will set the corresponding interrupt bit in the general purpose i/o interrupt status and enable register (gpio_int_sts_en) . when cleared, a low logic level on the gpio pin will set the corresponding interrupt bit. 12.3 led operation each gpio can be individually selected to functi on as a led. these pins are configured as led outputs by setting the corresponding led enable 5-0 (led_en[5:0]) bit in the led configuration register (led_cfg) . when configured as a led, the pin is either a push-pull or open-drain / open- source output and the gpio related input buffer and pull-up are disabled. the default configuration, including polarity, is determined by input straps or eeprom entries. refer to configuration straps on page 46 for additional information. the functions associated with each led pin are configurable via the led function 1-0 (led_fun[1:0]) bits of the led configuration register (led_cfg) . these bits allow the configuration of each led pin to indicate various port related func tions. these functions are described in table 12.1 , followed by a detailed definition of each indication type. the default values of the led function 1-0 (led_fun[1:0]) and led enable 5-0 (led_en[5:0]) bits of the led configuration register (led_cfg) are determined by the led_fun_strap[1:0] and led_en_strap[5:0] configuration straps. for more information on the led configuration register (led_cfg) and its related straps, refer to section 13.2.2.4, "led configuration register (led_cfg)," on page 150 . the various led indication functions shown in table 12.1 are described in the following sections. table 12.1 led operation as a function of led_fun[1:0] 00b 01b 10b 11b led5 (gpio5) link / activity port 2 100link / activity port 2 tx port 0 tx_en port 0 led4 (gpio4) full-duplex / collision port 2 full-duplex / collision port 2 link / activity port 2 tx_en port 2 led3 (gpio3) speed port 2 10link / activity port 2 speed port 2 rx_dv port 2 led2 (gpio2) link / activity port 1 100link / activity port 1 rx port 0 rx_dv port 0 led1 (gpio1) full-duplex / collision port 1 full-duplex / collision port 1 link / activity port 1 tx_en port 1 led0 (gpio0) speed port 1 10link / activity port 1 speed port 1 rx_dv port 1 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 137 revision 1.5 (07-08-11) datasheet 12.3.1 led function definitions when led_fun[1:0] = 00b, 01b, or 10b when led function 1-0 (led_fun[1:0]) is 00b, 01b, or 10b, the following led rules apply: ? active is defined as the pin being driven to the opposite value latched at reset on the led_pol_strap[5:0] led polarity hard-straps. led polarity is determined by these hard-straps as detailed in section 4.2.4, "configuration straps," on page 46 . the led polarity cannot be modified via soft-straps. ? inactive is defined as the pin not being driven. ? the input buffers and pull-ups are disabled on the shared gpio/led pins. when led function 1-0 (led_fun[1:0]) is 00b, 01b, or 10b, the following led function definitions apply: ? tx port 0 - the signal is pulsed active for 80ms to indicate activity from the switch fabric to the external mii pins. this signal is then made inactive for a minimum of 80ms, after which the process will repeat if tx activity is again detected. note: link indication does not affect this function. ? rx port 0 - the signal is pulsed active for 80ms to indicate activity from the external mii pins to the switch fabric. this signal is then made inactive for a minimum of 80ms, after which the process will repeat if rx activity is again detected. note: link indication does not affect this function. ? link / activity port 1/2 - a steady active output indicates that the port has a valid link, while a steady inactive output indicates no link on the port. the signal is pulsed inactive for 80ms to indicate transmit or receive activity on the port. the signal is then made active for a minimum of 80ms, after which the process will repeat if rx or tx activity is again detected. ? full-duplex / collision port 1/2 - a steady active output indicates the port is in full-duplex mode. in half-duplex mode, the signal is pulsed active for 80ms to indicate a network collision. the signal is then made inactive for a minimum of 80ms, after which the process will repeat if another collision is detected. the signal will be held inactive if the port does not have a valid link. ? speed port 1/2 - a steady active output indicates a valid link with a speed of 100mbps. a steady inactive output indicates a speed of 10mbps. the signal will be held inactive if the port does not have a valid link. ? 100link / activity port 1/2 - a steady active output indicates the port has a valid link and the speed is 100mbps. the signal is pulsed inactive for 80 ms to indicate tx or rx activity on the port. the signal is then driven active for a minimum of 80ms, after which the process will repeat if rx or tx activity is again detected. the signal will be held inactive if the port does not have a valid link or the speed is not 100mbps. ? 10link / activity port 1/2 - a steady active output indicates the port has a valid link and the speed is 10mbps. the signal is pulsed inactive for 80ms to indicate transmit or receive activity on the port. the signal is then driven active for a minimum of 80ms, after which the process will repeat if rx or tx activity is again detected. this signal will be held inactive if the port does not have a valid link or the speed is not 10mbps. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 138 smsc lan9303/lan9303i datasheet 12.3.2 led function definitions when led_fun[1:0] = 11b when led function 1-0 (led_fun[1:0]) is 11b, the following led rules apply: ? the led pins are push-pull drivers. ? the led polarity does not depend upon the led_pol_strap[5:0] led polarity hard-straps. the led pin is driven high when the function signal is high, and is driven low when the function signal is low. ? the input buffers and pull-ups are disabled on the shared gpio/led pins. when led function 1-0 (led_fun[1:0]) is 11b, the following led function definitions apply: ? tx_en port 0 - non-stretched tx_en signal from the switch fabric to the external mii pins. note: link indication does not affect this function. ? rx_dv port 0 - non-stretched rx_dv signal from the external mii pins to the switch fabric. note: link indication does not affect this function. ? tx_en port 1 - non-stretched tx_en signal from the switch fabric to the phy. note: link indication does not affect this function. ? rx_dv port 1 - non-stretched rx_dv signal from the phy to the switch fabric. note: link indication does not affect this function. ? tx_en port 2 - non-stretched tx_en signal from the switch fabric to the phy. note: link indication does not affect this function. ? rx_dv port 2 - non-stretched rx_dv signal from the phy to the switch fabric. note: link indication does not affect this function. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 139 revision 1.5 (07-08-11) datasheet chapter 13 register descriptions this section describes the various control and status registers (csrs). these registers are broken into 3 categories. the following sections detail the functionality and accessibility of all the registers within each category: ? section 13.2, "system control and status registers," on page 141 ? section 13.3, "ethernet phy control and status registers," on page 194 ? section 13.4, "switch fabric control and status registers," on page 215 figure 13.1 contains an overall base register memory map of the device. this memory map is not drawn to scale, and should be used for general reference only. note: not all registers are memory mapped or directly addressable. for details on the accessibility of the various registers, refer the register sub-sections listed above. figure 13.1 base register memory map base + 000h 04ch reserved 2e0h ... 2dch 3ffh switch csr direct data registers 200h ... 050h virtual phy registers 1c0h 1dch 19ch switch interface registers 1ach 1b0h phy management interface registers 0a4h 0a8h reserved system csrs reserved 0ach downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 140 smsc lan9303/lan9303i datasheet 13.1 register nomenclature table 13.1 describes the register bit attribute notation used throughout this document. many of these register bit notations can be combined. some examples of this are shown below: ? r/w: can be written. will return current setting on a read. ? r/wac: will return current setting on a read. writing anything clears the bit. table 13.1 register bit types register bit type notation register bit description r read: a register or bit with this attribute can be read. w read: a register or bit with this attribute can be written. ro read only: read only. writes have no effect. wo write only: if a register or bit is write-only, reads will return unspecified data. wc write one to clear: writing a one clears the value. writing a zero has no effect wac write anything to clear: writing anything clears the value. rc read to clear: contents is cleared after the read. writes have no effect. ll latch low: clear on read of register. lh latch high: clear on read of register. sc self-clearing: contents are self-cleared after the being set. writes of zero have no effect. contents can be read. ss self-setting: contents are self-setting after being cleared. writes of one have no effect. contents can be read. ro/lh read only, latch high: bits with this attribute will stay high until the bit is read. after it is read, the bit will either remain high if the high condition remains, or will go low if the high condition has been removed. if the bit has not been read, the bit will remain high regardless of a change to the high condition. this mode is used in some ethernet phy registers. nasr not affected by software reset. the state of nasr bits do not change on assertion of a software reset. reserved reserved field: reserved fields must be written with zeros to ensure future compatibility. the value of reserved bits is not guaranteed on a read. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 141 revision 1.5 (07-08-11) datasheet 13.2 system contro l and status registers the system csrs are directly addressable memo ry mapped registers with a base address offset range of 050h to 2dch. these registers are accessed through the i 2 c serial interface or the miim/smi serial interface. for more information on the various modes and their corresponding address configurations, see section 2.3, "modes of operation," on page 19 . table 13.2 lists the system csrs and their corresponding addresses in order. all system csrs are reset to their default value on the assertion of a chip-level reset. the system csrs can be divided into 7 sub-categories. each of these sub-categories contains the system csr descriptions of the associated registers. the regist er descriptions are categorized as follows: ? section 13.2.1, "interrupts," on page 143 ? section 13.2.2, "gpio/led," on page 147 ? section 13.2.3, "eeprom," on page 151 ? section 13.2.4, "switch fabric," on page 155 ? section 13.2.5, "phy management interface (pmi)," on page 170 ? section 13.2.6, "virtual phy," on page 172 ? section 13.2.7, "miscellaneous," on page 187 table 13.2 system control and status registers address offset symbol register name 000h - 04ch reserved reserved for future use 050h id_rev chip id and revision register, section 13.2.7.1 054h irq_cfg interrupt configuration register, section 13.2.1.1 058h int_sts interrupt status register, section 13.2.1.2 05ch int_en interrupt enable register, section 13.2.1.3 060h reserved reserved for future use 064h byte_test byte order test register, section 13.2.7.2 068h - 070h reserved reserved for future use 074h hw_cfg hardware configuration register, section 13.2.7.3 078h - 088h reserved reserved for future use 08ch gpt_cfg general purpose timer configuration register, section 13.2.7.4 090h gpt_cnt general purpose timer count register, section 13.2.7.5 094h - 098h reserved reserved for future use 09ch free_run free running counter register, section 13.2.7.6 0a0h reserved reserved for future use 0a4h pmi_data phy management interface data register, section 13.2.5.1 0a8h pmi_access phy management interface access register, section 13.2.5.2 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 142 smsc lan9303/lan9303i datasheet 0ach - 19ch reserved reserved for future use 1a0h manual_fc_1 port 1 manual flow control register, section 13.2.4.1 1a4h manual_fc_2 port 2 manual flow control register, section 13.2.4.2 1a8h manual_fc_0 port 0 manual flow control register, section 13.2.4.3 1ach switch_csr_data switch fabric csr interface data register, section 13.2.4.4 1b0h switch_csr_cmd switch fabric csr interface command register, section 13.2.4.5 1b4h e2p_cmd eeprom command register, section 13.2.3.1 1b8h e2p_data eeprom data register, section 13.2.3.2 1bch led_cfg led configuration register, section 13.2.2.4 1c0h vphy_basic_ctrl virtual phy basic control register, section 13.2.6.1 1c4h vphy_basic_status virtual phy basic status register, section 13.2.6.2 1c8h vphy_id_msb virtual phy identification msb register, section 13.2.6.3 1cch vphy_id_lsb virtual phy identification lsb register, section 13.2.6.4 1d0h vphy_an_adv virtual phy auto-negotiation advertisement register, section 13.2.6.5 1d4h vphy_an_lp_base_ability virtual phy auto-negotiation link partner base page ability register, section 13.2.6.6 1d8h vphy_an_exp virtual phy auto-negotiation expansion register, section 13.2.6.7 1dch vphy_special_control_status virtual phy special control/status register, section 13.2.6.8 1e0h gpio_cfg general purpose i/o configuration register, section 13.2.2.1 1e4h gpio_data_dir general purpose i/o data & direction register, section 13.2.2.2 1e8h gpio_int_sts_en general purpose i/o interrupt status and enable register, section 13.2.2.3 1ech reserved reserved for future use 1f0h switch_mac_addrh switch mac address high register, section 13.2.4.6 1f4h switch_mac_addrl switch mac address low register, section 13.2.4.7 1f8h reset_ctl reset control register, section 13.2.7.7 1fch reserved reserved for future use 200h-2dch switch_csr_direct_data switch engine csr interface direct data register, section 13.2.4.8 2e0h-3ffh reserved reserved for future use table 13.2 system control and status registers (continued) address offset symbol register name downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 143 revision 1.5 (07-08-11) datasheet 13.2.1 interrupts this section details the interrupt related system csr s. these registers control, configure, and monitor the irq interrupt output pin and the various interrupt sources. for more information on interrupts, refer to chapter 5, "system interrupts," on page 55 . 13.2.1.1 interrupt configur ation register (irq_cfg) this read/write register configures and indicates the state of the irq signal. offset: 054h size: 32 bits bits description type default 31:24 interrupt de-assertion interval (int_deas) this field determines the interrupt request de-assertion interval in multiples of 10 microseconds. setting this field to zero causes the device to disable the int_deas interval, reset the interval counter and issue any pending interrupts. if a new, non- zero value is written to this field, any subsequent interrupts will obey the new setting. r/w 00h 23:15 reserved ro - 14 interrupt de-assertion interval clear (int_deas_clr) writing a 1 to this register clears the de-assertion counter in the interrupt controller, thus causing a new de-assertion interval to begin (regardless of whether or not the interrupt controller is currently in an active de-assertion interval). 0: normal operation 1: clear de-assertion counter r/w sc 0h 13 interrupt de-assertion status (int_deas_sts) when set, this bit indicates that interrupts are currently in a de-assertion interval, and will not be sent to the irq pin. when this bit is clear, interrupts are not currently in a de-assertion interval, and will be sent to the irq pin. 0: no interrupts in de-assertion interval 1: interrupts in de-assertion interval ro sc 0b 12 master interrupt (irq_int) this read-only bit indicates the state of the internal irq line, regardless of the setting of the irq_en bit, or the state of the interrupt de-assertion function. when this bit is set, one of the enabled interrupts is currently active. 0: no enabled interrupts active 1: one or more enabled interrupts active ro 0b 11:9 reserved ro - 8 irq enable (irq_en) this bit controls the final interrupt output to the irq pin. when clear, the irq output is disabled and permanently de-asserted. this bit has no effect on any internal interrupt status bits. 0: disable output on irq pin 1: enable output on irq pin r/w 0b 7:5 reserved ro - downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 144 smsc lan9303/lan9303i datasheet note 13.1 register bits designated as nasr are not reset when the digital reset (digital_rst) bit in the reset control register (reset_ctl) is set. 4 irq polarity (irq_pol) when cleared, this bit enables the irq line to function as an active low output. when set, the irq output is active high. when the irq is configured as an open-drain output (via the irq_type bit), this bit is ignored, and the interrupt is always active low. 0: irq active low output 1: irq active high output r/w nasr note 13.1 0b 3:1 reserved ro - 0 irq buffer type (irq_type) when this bit is cleared, the irq pin functions as an open-drain output for use in a wired-or interrupt configuration. when set, the irq is a push-pull driver. note: when configured as an open-drain output, the irq_pol bit is ignored and the interrupt output is always active low. 0: irq pin open-drain output 1: irq pin push-pull driver r/w nasr note 13.1 0b bits description type default downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 145 revision 1.5 (07-08-11) datasheet 13.2.1.2 interrupt status register (int_sts) this register contains the current status of the generated interrupts. a value of 1 indicates the corresponding interrupt conditions have been met, while a value of 0 indicates the interrupt conditions have not been met. the bits of this register reflect the status of the interrupt source regardless of whether the source has been enabled as an interrupt in the interrupt enable register (int_en) . where indicated as r/wc, writing a 1 to the corresponding bits acknowledges and clears the interrupt. offset: 058h size: 32 bits bits description type default 31 software interrupt (sw_int) this interrupt is generated when the software interrupt enable (sw_int_en) bit of the interrupt enable register (int_en) is set high. writing a one clears this interrupt. r/wc 0b 30 device ready (ready) this interrupt indicates that the device is ready to be accessed after a power-up or reset condition. r/wc 0b 29 reserved ro - 28 switch fabric interr upt event (switch_int) this bit indicates an interrupt event from the switch fabric. this bit should be used in conjunction with the switch global interrupt pending register (sw_ipr) to determine the source of the interrupt event within the switch fabric. ro 0b 27 port 2 phy interrupt event (phy_int2) this bit indicates an interrupt event from the port 2 phy. the source of the interrupt can be determined by polling the port x phy interrupt source flags register (phy_interrupt_source_x) . ro 0b 26 port 1 phy interrupt event (phy_int1) this bit indicates an interrupt event from the port 1 phy. the source of the interrupt can be determined by polling the port x phy interrupt source flags register (phy_interrupt_source_x) . ro 0b 25:20 reserved ro - 19 gp timer (gpt_int) this interrupt is issued when the general purpose timer count register (gpt_cnt) wraps past zero to ffffh. r/wc 0b 18:13 reserved ro - 12 gpio interrupt event (gpio) this bit indicates an interrupt event from the general purpose i/o. the source of the interrupt can be determined by polling the general purpose i/o interrupt status and enable register (gpio_int_sts_en) ro 0b 11:0 reserved ro - downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 146 smsc lan9303/lan9303i datasheet 13.2.1.3 interrupt enable register (int_en) this register contains the interrupt enables for the irq output pin. writing 1 to any of the bits enables the corresponding interrupt as a source for irq. bits in the interrupt status register (int_sts) register will still reflect the status of the interrupt source regardless of whether the source is enabled as an interrupt in this register (with the exception of software interrupt enable (sw_int_en) ). for descriptions of each interrupt, refer to the interrupt status register (int_sts) bits, which mimic the layout of this register. offset: 05ch size: 32 bits bits description type default 31 software interrupt enable (sw_int_en) r/w 0b 30 device ready enable (ready_en) r/w 0b 29 reserved ro - 28 switch fabric interrupt e vent enable (switch_int_en) r/w 0b 27 port 2 phy interrupt event enable (phy_int2_en) r/w 0b 26 port 1 phy interrupt event enable (phy_int1_en) r/w 0b 25:20 reserved ro - 19 gp timer interrupt enable (gpt_int_en) r/w 0b 18:13 reserved ro - 12 gpio interrupt even t enable (gpio_en) r/w 0b 11:0 reserved ro - downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 147 revision 1.5 (07-08-11) datasheet 13.2.2 gpio/led this section details the general purpose i/o (gpio) and led related system csrs. 13.2.2.1 general purpose i/o conf iguration regist er (gpio_cfg) this read/write register configures the gpio input and output pins. the polarity of the gpio pins is configured here. offset: 1e0h size: 32 bits bits description type default 31:22 reserved ro - 21:16 gpio interrupt polarity 5-0 (gpio_int_pol[5:0]) these bits set the interrupt polarity of the gpio pins. the configured level (high/low) will set the corresponding gpio_int bit in the general purpose i/o interrupt status and enable register (gpio_int_sts_en) . 0: sets low logic level trigge r on corresponding gpio pin 1: sets high logic level trigger on corresponding gpio pin r/w 0h 15:6 reserved ro - 5:0 gpio buffer type 5-0 (gpiobuf[5:0]) this field sets the buffer types of the gpio pins. 0: corresponding gpio pin configured as an open-drain driver 1: corresponding gpio pin configured as a push/pull driver as an open-drain driver, the output pin is driven low when the corresponding data register is cleared, and is not driven when the corresponding data register is set. r/w 0h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 148 smsc lan9303/lan9303i datasheet 13.2.2.2 general purpose i/o data & direction register (gpio_data_dir) this read/write register configures the direction of the gpio pins and contains the gpio input and output data bits. offset: 1e4h size: 32 bits bits description type default 31:22 reserved ro - 21:16 gpio direction 5-0 (gpdir[5:0]) these bits set the input/output direction of the gpio pins. 0: gpio pin is configured as an input 1: gpio pin is configured as an output r/w 0h 15:6 reserved ro - 5:0 gpio data 5-0 (gpiod[5:0]) when a gpio pin is enabled as an output, the value written to this field is output on the corresponding gpio pin. upon a read, the value returned depends on the current direction of the pin. if the pin is an input, the data reflects the current state of the corresponding gpio pin. if the pin is an output, the data is the value that was last written into this register. the pin direction is determined by the gpdir bits of this register. r/w 0h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 149 revision 1.5 (07-08-11) datasheet 13.2.2.3 general purpose i/o interrupt status and enable register (gpio_int_sts_en) this read/write register contains the gpio interrupt status bits. writing a 1 to any of the interrupt status bits acknowledges and clears the interrupt. if enabled, these interrupt bits are cascaded into the gpio interrupt event (gpio) bit of the interrupt status register (int_sts) . writing a 1 to any of the interrupt enable bits will enable the corresponding interrupt as a source. status bits will still reflect the status of the interrupt source regardless of whether the source is enabled as an interrupt in this register. the gpio interrupt event enable (gpio_en) bit of the interrupt enable register (int_en) must also be set in order for an actual system level interrupt to occur. refer to chapter 5, "system interrupts," on page 55 for additional information. offset: 1e8h size: 32 bits bits description type default 31:22 reserved ro - 21:16 gpio interrupt enable[5 :0] (gpio[5:0]_int_en) when set, these bits enable the corresponding gpio interrupt. note: the gpio interrupts must also be enabled via the gpio interrupt event enable (gpio_en) bit of the interrupt enable register (int_en) , in order to cause the interrupt pin (irq) to be asserted. r/w 0h 15:6 reserved ro - 5:0 gpio interrupt[5:0] (gpio[5:0]_int) these signals reflect the interrupt status as generated by the gpios. these interrupts are configured through the general purpose i/o configuration register (gpio_cfg) . note: as gpio interrupts, gpio inputs are level sensitive and must be active greater than 40 ns to be recognized as interrupt inputs. r/wc 0h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 150 smsc lan9303/lan9303i datasheet 13.2.2.4 led configuration register (led_cfg) this read/write register configures the gpio[5:0] pi ns as led[5:0] pins and sets their functionality. note 13.2 the default value of this field is determined by the configuration strap led_fun_strap[1:0] ]. configuration strap values are latched on pow er-on reset or nrst de-assertion. some configuration straps can be overridden by values from the eeprom loader. refer to section 4.2.4, "configuration straps," on page 46 for more information. note 13.3 the default value of this field is determined by the configuration strap led_en_strap[5:0] . configuration strap values are latched on pow er-on reset or nrst de-assertion. some configuration straps can be overridden by values from the eeprom loader. refer to section 4.2.4, "configuration straps," on page 46 for more information. offset: 1bch size: 32 bits bits description type default 31:10 reserved ro - 9:8 led function 1-0 (led_fun[1:0]) these bits control the function associated with each led pin as shown in table 12.1 of section 12.3, "led operation," on page 136 . note: in order for these assignments to be valid, the particular pin must be enabled as an led output pin via the led_en[5:0] bits of this register. r/w note 13.2 7:6 reserved ro - 5:0 led enable 5-0 (led_en[5:0]) this field toggles the functionality of the gpio[5:0] pins between gpio and led. 0: enables the associated pin as a gpio signal 1: enables the associated pin as a led output when configured as led outputs, the pins are either push-pull or open- drain/open-source outputs and the pull-ups and input buffers are disabled. push-pull is selected when led_fun[1:0] = 11b, otherwise, they are open- drain/open-source. when open-drain/open-source, the polarity of the pins depends upon the strap value sampled at reset. if a high is sampled at reset, then this signal is active low. note: the polarity is determined by the strap value sampled on reset (a hard-strap) and not the soft-strap value (of the shared strap) set via eeprom. when configured as a gpio output, the pins are configured per the general purpose i/o configuration register (gpio_cfg) and the general purpose i/o data & direction register (gpio_data_dir) . the polarity of the pins does not depend upon the strap value sampled at reset. r/w note 13.3 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 151 revision 1.5 (07-08-11) datasheet 13.2.3 eeprom this section details the eeprom re lated system csrs. these registers should only be used if an eeprom has been connected to t he device. refer to chapter section 8.3, "i2c master eeprom controller," on page 109 for additional information. 13.2.3.1 eeprom command register (e2p_cmd) this read/write register is used to control the read and write operations of the serial eeprom. offset: 1b4h size: 32 bits bits description type default 31 eeprom controller busy (epc_busy) when a 1 is written into this bit, the operation specified in the epc_command field of this regist er is performed at the specified eeprom address. this bit will remain set until the selected o peration is complete. in the case of a read, this indicates that the host can read valid data from the eeprom data register (e2p_data) . the e2p_cmd and e2p_data registers should not be modified until this bit is cleared. in the case where a write is attempted and an eeprom is not present, the epc_busy bit remains set until the eeprom controller timeout (epc_timeout) bit is set. at this time the epc_busy bit is cleared. note: epc_busy is set immediately following power-up, or pin reset, or digital reset (digital_rst) . after the eeprom loader has finished loading, the epc_busy bit is cleared. refer to chapter section 8.4, "eeprom loader," on page 115 for more information. r/w sc 0b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 152 smsc lan9303/lan9303i datasheet 30:28 eeprom controller co mmand (epc_command) this field is used to issue commands to the eeprom controller. the eeprom controller will execute a command when the epc_busy bit is set. a new command must not be issued until the previous command completes. the field is encoded as follows: note: only the read, write and reload commands are valid for i 2 c mode. if an unsupported command is attempted, the epc_busy bit will be cleared and epc_timeout will be set. the eeprom operations are defined as follows: read (read location) this command will cause a read of the eeprom location pointed to by the epc_address bit field. the result of the read is available in the eeprom data register (e2p_data) . write (write location) if erase/write operations are enabled in the eeprom, this command will cause the contents of the eeprom data register (e2p_data) to be written to the eeprom location selected by the epc_address field. reload (eeprom loader reload) instructs the eeprom loader to reload the device from the eeprom. if a value of a5h is not found in the first address of the eeprom, the eeprom is assumed to be un-programmed and the reload operation will fail. the cfg_loaded bit indicates a successful load. following this command, the device will enter the not ready state. the device ready (ready) bit in the hardware configuration register (hw_cfg) should be polled to determine when the reload is complete. r/w 000b 27:19 reserved ro - 18 eeprom loader address over flow (loader_overflow) this bit indicates that the eeprom load er tried to read pa st the end of the eeprom address space. this indi cates misconfigured eeprom data. this bit is cleared when the eeprom loader is restarted with a reload command, or a digital reset (digital_rst) . ro 0b 17 eeprom controller ti meout (epc_timeout) this bit is set when a timeout occurs, indicating the last operation was unsuccessful. if an eeprom write operation is performed, and no response is received from the eeprom within 30ms, the eeprom controller will timeout and return to its idle state. the bit is also set if the eeprom fails to respond with the appropriate acks, if the eeprom slave device holds the clock low for more than 30ms, if the i 2 c bus is not acquired within 1.92 seconds, or if an unsupported epc_command is attempted. this bit is cleared when written high. r/wc 0b bits description type default [30] [29] [28] operation 000 r e a d 0 0 1 reserved 0 1 0 reserved 011 w r i t e 1 0 0 reserved 1 0 1 reserved 1 1 0 reserved 111 r e l o a d downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 153 revision 1.5 (07-08-11) datasheet 16 configuration loaded (cfg_loaded) when set, this bit indicates that a valid eeprom was found and the eeprom loader completed nor mally. this bit is se t upon a successful load. it is cleared on power-up, pin and digital reset (digital_rst) resets, or at the start of a reload. this bit is cleared when written high. ro 0b 15:0 eeprom controller address (epc_address) this field is used by the eeprom controller to address a specific memory location in the serial eeprom. this address mu st be byte aligned. r/w 0000h bits description type default downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 154 smsc lan9303/lan9303i datasheet 13.2.3.2 eeprom data register (e2p_data) this read/write register is used in conjunction with the eeprom command register (e2p_cmd) to perform read and write operations with the serial eeprom. offset: 1b8h size: 32 bits bits description type default 31:8 reserved ro - 7:0 eeprom data (eeprom_data) this field contains the data read from or written to the eeprom. r/w 00h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 155 revision 1.5 (07-08-11) datasheet 13.2.4 switch fabric this section details the memory mapped system cs rs which are related to the switch fabric. the flow control of all three ports of the switch fabric can be configured via the memory mapped system csrs manual_fc_1, manual_fc_2 and manual_fc_0. the mac address used by the switch for pause frames is configured via the sw itch_mac_addrh and switch_mac_addrl registers. in addition, the switch_csr_cmd, swit ch_csr_data and switch_csr_direct_data registers serve as a memory mapped accessible interface to the full range of otherwise inaccessible switch control and status registers. a list of all the switch fabric csrs can be seen in table 13.14 . for additional information on the switch fabric, including a full explanation on how to use the switch fabric csr interface registers, refer to chapter 6, "switch fabric," on page 60 . for detailed descriptions of the switch fabric csrs that ar e accessible via these interface registers, refer to section section 13.4, "switch fabric control and status registers" . 13.2.4.1 port 1 manual flow control register (manual_fc_1) this read/write register allows for the manual conf iguration of the switch port 1 flow control. this register also provides read back of the currently enabled flow control settings, whether set manually or auto-negotiated. refer to section 6.2.3, "flow control enable logic," on page 63 for additional information. note: the flow control values in the phy_an_adv_1 register (see section 13.3.2.5, on page 202 ) within the phy are not affected by the values of this register. offset: 1a0h size: 32 bits bits description type default 31:7 reserved ro - 6 port 1 backpressure enable (bp_en_1) this bit enables/disables the generation of half-duplex backpressure on switch port 1. 0: disable backpressure 1: enable backpressure r/w note 13.4 5 port 1 current duplex (cur_dup_1) this bit indicates the actual duplex setting of switch port 1. 0: full-duplex 1: half-duplex ro note 13.5 4 port 1 current receive flow control enable (cur_rx_fc_1) this bit indicates the actual receive flow setting of switch port 1. 0: flow control receive is currently disabled 1: flow control receive is currently enabled ro note 13.5 3 port 1 current transmit flow control enable (cur_tx_fc_1) this bit indicates the actual transmit flow setting of switch port 1. 0: flow control transmit is currently disabled 1: flow control transmit is currently enabled ro note 13.5 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 156 smsc lan9303/lan9303i datasheet note 13.4 the default value of this field is determined by the bp_en_strap_1 configuration strap. the strap values are loaded during reset and can be re-written by the eeprom loader. once the eeprom loader re-writes the values, this register is updated with the new values. see section 4.2.4, "configuration straps," on page 46 for more information. note 13.5 the default value of this bit is determined by multiple strap settings. the strap values are loaded during reset and can be re-written by the eeprom load er. once the eeprom loader re-writes the values, this register is updated with the new values. refer to section 6.2.3, "flow control enable logic," on page 63 for additional information. note 13.6 the default value of this field is determined by the fd_fc_strap_1 configuration strap. the strap values are loaded during reset and can be re-written by the eeprom loader. once the eeprom loader re-writes the values, this register is updated with the new values. see section 4.2.4, "configuration straps," on page 46 for more information. note 13.7 the default value of this field is determined by the manual_fc_strap_1 configuration strap. the strap values are loaded during reset and can be re-written by the eeprom loader. once the eeprom loader re-writes the values, this register is updated with the new values. see section 4.2.4, "configuration straps," on page 46 for more information. 2 port 1 full-duplex receive flow control enable (rx_fc_1) when the manual_fc_1 bit is set, or auto-negotiation is disabled, this bit enables/disables the detection of full-duplex pause packets on switch port 1. 0: disable flow control receive 1: enable flow control receive r/w note 13.6 1 port 1 full-duplex transmit flow control enable (tx_fc_1) when the manual_fc_1 bit is set, or auto-negotiation is disabled, this bit enables/disables full-duplex pause packets to be generated on switch port 1. 0: disable flow control transmit 1: enable flow control transmit r/w note 13.6 0 port 1 full-duplex manual flow control select (manual_fc_1) this bit toggles flow control selection between manual and auto-negotiation. 0: if auto-negotiation is enable d, the auto-negot iation function determines the flow control of s witch port 1 (rx_fc_1 and tx_fc_1 values ignored). if auto-negotiation is disabled, the rx_fc_1 and tx_fc_1 values are used. 1: tx_fc_1 and rx_fc_1 bits determine the flow control of switch port 1 when in full-duplex mode. r/w note 13.7 bits description type default downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 157 revision 1.5 (07-08-11) datasheet 13.2.4.2 port 2 manual flow control register (manual_fc_2) this read/write register allows for the manual conf iguration of the switch port 2 flow control. this register also provides read back of the currently enabled flow control settings, whether set manually or auto-negotiated. refer to section 6.2.3, "flow control enable logic," on page 63 for additional information. note: the flow control values in the phy_an_adv_2 register (see section 13.3.2.5, on page 202 ) within the phy are not affected by the values of this register. offset: 1a4h size: 32 bits bits description type default 31:7 reserved ro - 6 port 2 backpressure enable (bp_en_2) this bit enables/disables the generation of half-duplex backpressure on switch port 2. 0: disable backpressure 1: enable backpressure r/w note 13.8 5 port 2 current duplex (cur_dup_2) this bit indicates the actual duplex setting of switch port 2. 0: full-duplex 1: half-duplex ro note 13.9 4 port 2 current receive flow control enable (cur_rx_fc_2) this bit indicates the actual receive flow setting of switch port 2. 0: flow control receive is currently disabled 1: flow control receive is currently enabled ro note 13.9 3 port 2 current transmit flow control enable (cur_tx_fc_2) this bit indicates the actual transmit flow setting of switch port 2. 0: flow control transmit is currently disabled 1: flow control transmit is currently enabled ro note 13.9 2 port 2 full-duplex receive flow control enable (rx_fc_2) when the manual_fc_2 bit is set, or auto-negotiation is disabled, this bit enables/disables the detection of full-duplex pause packets on switch port 2. 0: disable flow control receive 1: enable flow control receive r/w note 13.10 1 port 2 full-duplex transmit flow control enable (tx_fc_2) when the manual_fc_2 bit is set, or auto-negotiation is disabled, this bit enables/disables full-duplex pause packets to be generated on switch port 2. 0: disable flow control transmit 1: enable flow control transmit r/w note 13.10 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 158 smsc lan9303/lan9303i datasheet note 13.8 the default value of this field is determined by the bp_en_strap_2 configuration strap. the strap values are loaded during reset and can be re-written by the eeprom loader. once the eeprom loader re-writes the values, this register is updated with the new values. see section 4.2.4, "configuration straps," on page 46 for more information. note 13.9 the default value of this bit is determined by multiple strap settings. the strap values are loaded during reset and can be re-written by the eeprom load er. once the eeprom loader re-writes the values, this register is updated with the new values. refer to section 6.2.3, "flow control enable logic," on page 63 for additional information. note 13.10 the default value of this field is determined by the fd_fc_strap_2 configuration strap. the strap values are loaded during reset and can be re-written by the eeprom loader. once the eeprom loader re-writes the values, this register is updated with the new values. see section 4.2.4, "configuration straps," on page 46 for more information. note 13.11 the default value of this field is determined by the manual_fc_strap_2 configuration strap. the strap values are loaded during reset and can be re-written by the eeprom loader. once the eeprom loader re-writes the values, this register is updated with the new values. see section 4.2.4, "configuration straps," on page 46 for more information. 0 port 2 full-duplex manual flow control select (manual_fc_2) this bit toggles flow control selection between manual and auto-negotiation. 0: if auto-negotiation is enable d, the auto-negot iation function determines the flow control of s witch port 2 (rx_fc_2 and tx_fc_2 values ignored). if auto-negotiation is disabled, the rx_fc_2 and tx_fc_2 values are used. 1: tx_fc_2 and rx_fc_2 bits determine the flow control of switch port 2 when in full-duplex mode r/w note 13.11 bits description type default downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 159 revision 1.5 (07-08-11) datasheet 13.2.4.3 port 0 manual flow control register (manual_fc_0) this read/write register allows for the manual conf iguration of the switch port 0 flow control. this register also provides read back of the currently enabled flow control settings, whether set manually or auto-negotiated. refer to section 6.2.3, "flow control enable logic," on page 63 for additional information. note: the flow control values in the section 13.2.6.5, "virtual phy auto-negotiation advertisement register (vphy_an_adv)," on page 179 are not affected by the values of this register. offset: 1a8h size: 32 bits bits description type default 31:7 reserved ro - 6 port 0 backpressure enable (bp_en_0) this bit enables/disables the generation of half-duplex backpressure on switch port 0. 0: disable backpressure 1: enable backpressure r/w note 13.12 5 port 0 current duplex (cur_dup_0) this bit indicates the actual duplex setting of switch port 0. 0: full-duplex 1: half-duplex ro note 13.13 4 port 0 current receive flow control enab le (cur_rx_0) this bit indicates the actual receive flow setting of switch port 0 0: flow control receive is currently disabled 1: flow control receive is currently enabled ro note 13.13 3 port 0 current transmit flow control enable (cur_tx_fc_0) this bit indicates the actual transmit flow setting of switch port 0. 0: flow control transmit is currently disabled 1: flow control transmit is currently enabled ro note 13.13 2 port 0 receive flow control enable (rx_fc_0) when the manual_fc_0 bit is set, or virtual auto-negotiation is disabled, this bit enables/disables the detection of full-duplex pause packets on switch port 0. 0: disable flow control receive 1: enable flow control receive r/w note 13.14 1 port 0 transmit flow control enable (tx_fc_0) when the manual_fc_0 bit is set, or virtual auto-negotiation is disabled, this bit enables/disables full-duplex pause packets to be generated on switch port 0. 0: disable flow control transmit 1: enable flow control transmit r/w note 13.14 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 160 smsc lan9303/lan9303i datasheet note 13.12 the default value of this field is determined by the bp_en_strap_0 configuration strap. the strap value is loaded during reset and can be re-written by the eeprom loader. once the eeprom loader re-writes the value, this register is updated with the new values. see section 4.2.4, "configuration straps," on page 46 for more information. note 13.13 the default value of this bit is determined by multiple strap settings. the strap values are loaded during reset and can be re-written by the eeprom load er. once the eeprom loader re-writes the values, this register is updated with the new values. refer to section 6.2.3, "flow control enable logic," on page 63 for additional information. note 13.14 the default value of this field is determined by the fd_fc_strap_0 configuration strap. the strap value is loaded during reset and can be re-written by the eeprom loader. once the eeprom loader re-writes the value, this register is updated with the new values. see section 4.2.4, "configuration straps," on page 46 for more information. note 13.15 this bit is ro when in mac mode. note 13.16 the default value of this field is determined by the manual_fc_strap_0 configuration strap. the strap value is loaded during reset and can be re-written by the eeprom loader. once the eeprom loader re-writes the value, this register is updated with the new values. in mac mode, this bit is not re-written by the eeprom loader and has a default value of 1. see section 4.2.4, "configuration straps," on page 46 for more information. 0 port 0 full-duplex manual flow control select (manual_fc_0) this bit toggles flow control selection between manual and auto-negotiation. 0: if auto-negotiation is enable d, the auto-negot iation function determines the flow control of s witch port 0 (rx_fc_0 and tx_fc_0 values ignored). if auto-negotiation is disabled, the rx_fc_0 and tx_fc_0 values are used. 1: tx_fc_0 and rx_fc_0 bits determine the flow control of switch port 0 when in full-duplex mode note: in mac mode, this bit is forced high. the virtual phy is not applicable in this mode and full-duplex flow control should be controlled manually by the host based on the external phys auto- negotiation results. r/w note 13.15 note 13.16 bits description type default downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 161 revision 1.5 (07-08-11) datasheet 13.2.4.4 switch fabric csr interface data register (switch_csr_data) this read/write register is used in conjunction with the switch fabric csr interface command register (switch_csr_cmd) to perform read and write operations with the switch fabric csrs. refer to section 13.4, "switch fabric control and status registers," on page 215 for details on the registers indirectly accessible via this register. offset: 1ach size: 32 bits bits description type default 31:0 switch csr data (csr_data) this field contains the value read from or written to the switch fabric csr. the switch fabric csr is selected via the csr address (csr_addr[15:0]) bits of the switch fabric csr interface command register (switch_csr_cmd) . upon a read, the value returned depends on the read/write (r_nw) bit in the switch fabric csr interface command register (switch_csr_cmd) . if read/write (r_nw) is set, the data is from the switch fabric. if read/write (r_nw) is cleared, the data is the value that was last written into this register. r/w 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 162 smsc lan9303/lan9303i datasheet 13.2.4.5 switch fabric csr interface command register (switch_csr_cmd) this read/write register is used in conjunction with the switch fabric csr interface data register (switch_csr_data) to control the read and write operations to the various switch fabric csrs. refer to section 13.4, "switch fabric control and status registers," on page 215 for details on the registers indirectly accessible via this register. offset: 1b0h size: 32 bits bits description type default 31 csr busy (csr_busy) when a 1 is written to this bit, the read or write operation (as determined by the r_nw bit) is performed to the specified switch fabric csr in csr address (csr_addr[15:0]) . this bit will remain set until the operation is complete, at which time the bit will clear. in the case of a read, the clearing of this bit indicates to the host that valid data can be read from the switch fabric csr interface data register (switch_csr_data) . the switch_csr_cmd and switch_csr_data registers should not be modified until this bit is cleared. r/w sc 0b 30 read/write (r_nw) this bit determines whether a read or write operation is performed by the host to the specified switch engine csr. 0: write 1: read r/w 0b 29 auto increment (auto_inc) this bit enables/disables the auto increment feature. when this bit is set, a write to the switch fabric csr interface data register (switch_csr_data) register will automatically set the csr busy (csr_busy) bit. once the write command is finished, the csr address (csr_addr[15:0]) will automatically increment. when this bit is set, a read from the switch fabric csr interface data register (switch_csr_data) will automatically increment the csr address (csr_addr[15:0]) and set the csr busy (csr_busy) bit. this bit should be cleared by software before the last read from the switch_csr_data register. 0: disable auto increment 1: enable auto increment note: this bit has precedence over the auto decrement (auto_dec) bit r/w 0b 28 auto decrement (auto_dec) this bit enables/disables the auto decrement feature. when this bit is set, a write to the switch fabric csr interface data register (switch_csr_data) will automatically set the csr busy (csr_busy) bit. once the write command is finished, the csr address (csr_addr[15:0]) will automatically decrement. when this bit is set, a read from the switch fabric csr interface data register (switch_csr_data) will automatically decrement the csr address (csr_addr[15:0]) and set the csr busy (csr_busy) bit. this bit should be cleared by software before the last read from the switch_csr_data register. 0: disable auto decrement 1: enable auto decrement r/w 0b 27:20 reserved ro - downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 163 revision 1.5 (07-08-11) datasheet 19:16 csr byte enable (csr_be[3:0]) this field is a 4-bit byte enable used for selection of valid bytes during write operations. bytes which are not selected will not be written to the corresponding switch engine csr. csr_be[3] corresponds to register data bits [31:24] csr_be[2] corresponds to register data bits [23:16] csr_be[1] corresponds to register data bits [15:8] csr_be[0] corresponds to register data bits [7:0] typically all four byte enables should be set for auto increment and auto decrement operations. r/w 0h 15:0 csr address (csr_addr[15:0]) this field selects the 16-bit address of the switch fabric csr that will be accessed with a read or write operation. refer to table 13.14, indirectly accessible switch control and status registers, on page 215 for a list of switch fabric csr addresses. r/w 00h bits description type default downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 164 smsc lan9303/lan9303i datasheet 13.2.4.6 switch fa bric mac address high register (switch_mac_addrh) this register contains the upper 16-bits of the ma c address used by the switch for pause frames. this register is used in conjunction with switch fabric mac address low register (switch_mac_addrl) . the contents of this register are optionally loaded from the eeprom at power-on through the eeprom loader if a programm ed eeprom is detected. the least significant byte of this register (bits [7:0]) is loaded from address 05h of the eeprom. the second byte (bits [15:8]) is loaded from address 06h of the eeprom. the host can update the contents of this field after the initialization process has completed. refer to section 13.2.4.7, "switch fabric mac address low register (switch_mac_addrl)" for information on how this address is loaded by the eeprom loader. section 8.4, "eeprom loader," on page 115 contains additional details on using the eeprom loader. offset: 1f0h size: 32 bits bits description type default 31:23 reserved ro - 22 diffpauseaddr when set, each port may have a unique mac address. r/w 0b 21:20 port 2 physical address [41:40] when diffpauseaddr is set, these bits are used as bits 41 and 40 of the mac address for port 2. r/w 10b 19:18 port 1 physical address [41:40] when diffpauseaddr is set, these bits are used as bits 41 and 40 of the mac address for port 1. r/w 01b 17:16 port 0 physical address [41:40] when diffpauseaddr is set, these bits are used as bits 41 and 40 of the mac address for port 0. r/w 00b 15:0 physical address[47:32] this field contains the upper 16-bits (47:32) of the physical address of the switch fabric macs. bits 41 and 10 are ignored if diffpauseaddr is set. r/w ffffh downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 165 revision 1.5 (07-08-11) datasheet 13.2.4.7 switch fabric mac addres s low register (switch_mac_addrl) this register contains the lower 32-bits of the ma c address used by the switch for pause frames. this register is used in conjunction with switch fabric mac address high register (switch_mac_addrh) . the contents of this register are optionally loaded from the eeprom at power-on through the eeprom loader if a programm ed eeprom is detected. the least significant byte of this register (bits [7:0]) is loaded from address 01h of the eeprom. the most significant byte (bits [31:24]) is loaded from address 04h of the eeprom. the host can update the contents of this field after the initialization process has completed. refer to section 8.4, "eeprom loader," on page 115 for information on using the eeprom loader. table 13.3 illustrates the byte ordering of the switch_mac_addrl and switch_mac_addrh registers with respect to the reception of the ether net physical address. also shown is the correlation between the eeprom addresses and the switch_mac_addrl and switch_mac_addrh registers. for example, if the desired ethernet physical address is 12-34-56-78-9a-bc, the switch_mac_addrl and switch_mac_addrh registers would be programmed as shown in figure 13.2 . the values required to automatically load this configuration from the eeprom are also shown. offset: 1f4h size: 32 bits bits description type default 31:0 physical address[31:0] this field contains the lower 32-bits (31:0) of the physical address of the switch fabric macs. r/w ff0f8000h table 13.3 switch_mac_ addrl, switch_mac_addrh, and eeprom byte ordering eeprom address register location written order of reception on ethernet 01h switch_mac_addrl[7:0] 1 st 02h switch_mac_addrl[15:8] 2 nd 03h switch_mac_addrl[23:16] 3 rd 04h switch_mac_addrl[31:24] 4 th 05h switch_mac_addrh[7:0] 5 th 06h switch_mac_addrh[15:8] 6 th downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 166 smsc lan9303/lan9303i datasheet note: by convention, the right nibble of the left most byte of the ethernet address (in this example, the 2 of the 12h) is the most significant nibble and is transmitted/received first. figure 13.2 example switch_mac_addrl , switch_mac_addrh, and eeprom setup 12h 0 7 34h 8 15 56h 16 23 78h 24 31 9ah bch xx xx a5h 12h 34h 56h 78h 9ah bch 00h 01h 02h 03h 04h 05h 06h eeprom switch_mac_addrl switch_mac_addrh 0 78 15 16 23 24 31 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 167 revision 1.5 (07-08-11) datasheet 13.2.4.8 switch fabric csr interface direct data registers (switch_csr_direct_data) this write-only register set is used to perform dire ctly addressed write operations to the switch fabric csrs. using this set of registers, writes can be directly addressed to select switch fabric registers, as specified in table 13.4 . writes within the switch fabric csr interface direct da ta registers (switch_csr_direct_data) address range automatically set the appropriate csr address (c sr_addr[15:0]) , set the four csr byte enable (csr_be[3:0]) bits, clear the read/write (r_nw) bit and set the csr busy (csr_busy) bit in the switch fabric csr interface co mmand register (switch_csr_cmd) . the completion of the write cycle is indicated when the csr busy (csr_busy) bit is cleared. the address that is set in the switch fabric csr interface command register (switch_csr_cmd) is mapped via table 13.4 . for more information on this method of writing to the switch fabric csrs, refer to section 6.2.3, "flow control enable logic," on page 63 . note: this set of registers is for write operations only. reads can be performed via the switch fabric csr interface command regi ster (switch_csr_cmd) and switch fabric csr interface data register (switch_csr_data) registers only. offset: 200h - 2dch size: 32 bits bits description type default 31:0 switch csr data (csr_data) this field contains the value to be written to the corresponding switch fabric register. wo 00000000h table 13.4 switch fabric csr to sw itch_csr_direct_data address range map register name switch fabric csr register # switch_csr_direct_data address general switch csrs sw_reset 0001h 200h sw_imr 0004h 204h switch port 0 csrs mac_rx_cfg_0 0401h 208h mac_tx_cfg_0 0440h 20ch mac_tx_fc_settings_0 0441h 210h mac_imr_0 0480h 214h switch port 1 csrs mac_rx_cfg_1 0801h 218h mac_tx_cfg_1 0840h 21ch mac_tx_fc_settings_1 0841h 220h mac_imr_1 0880h 224h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 168 smsc lan9303/lan9303i datasheet switch port 2 csrs mac_rx_cfg_2 0c01h 228h mac_tx_cfg_2 0c40h 22ch mac_tx_fc_settings_2 0c41h 230h mac_imr_2 0c80h 234h switch engine csrs swe_alr_cmd 1800h 238h swe_alr_wr_dat_0 1801h 23ch swe_alr_wr_dat_1 1802h 240h swe_alr_cfg 1809h 244h swe_vlan_cmd 180bh 248h swe_vlan_wr_data 180ch 24ch swe_diffserv_tbl_cmd 1811h 250h swe_diffserv_tbl_wr_data 1812h 254h swe_glb_ingress_ cfg 1840h 258h swe_port_ingress_cfg 1841h 25ch swe_admt_only_ vlan 1842h 260h swe_port_state 1843h 264h swe_pri_to_que 1845h 268h swe_port_mirror 1846h 26ch swe_ingress_port_typ 1847h 270h swe_bcst_throt 1848h 274h swe_admt_n_member 1849h 278h swe_ingress_rate_cfg 184ah 27ch swe_ingress_rate_cmd 184bh 280h swe_ingress_rate_wr_data 184dh 284h swe_ingress_regen_tbl_0 1855h 288h swe_ingress_regen_tbl_1 1856h 28ch swe_ingress_regen_tbl_2 1857h 290h swe_imr 1880h 294h buffer manager (bm) csrs table 13.4 switch fabric csr to switch_cs r_direct_data address range map (continued) register name switch fabric csr register # switch_csr_direct_data address downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 169 revision 1.5 (07-08-11) datasheet bm_cfg 1c00h 298h bm_drop_lvl 1c01h 29ch bm_fc_pause_lvl 1c02h 2a0h bm_fc_resume_lvl 1c03h 2a4h bm_bcst_lvl 1c04h 2a8h bm_rndm_dscrd_tbl_cmd 1c09h 2ach bm_rndm_dscrd_tbl_wdata 1c0ah 2b0h bm_egrss_port_type 1c0ch 2b4h bm_egrss_rate_00_01 1c0dh 2b8h bm_egrss_rate_02_03 1c0eh 2bch bm_egrss_rate_10_11 1c0fh 2c0h bm_egrss_rate_12_13 1c10h 2c4h bm_egrss_rate_20_21 1c11h 2c8h bm_egrss_rate_22_23 1c12h 2cch bm_vlan_0 1c13h 2d0h bm_vlan_1 1c14h 2d4h bm_vlan_2 1c15h 2d8h bm_imr 1c20h 2dch table 13.4 switch fabric csr to switch_cs r_direct_data address range map (continued) register name switch fabric csr register # switch_csr_direct_data address downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 170 smsc lan9303/lan9303i datasheet 13.2.5 phy management interface (pmi) the pmi registers are used to indirectly access the phy registers. refer to section 13.3, "ethernet phy control and status registers," on page 194 for additional information on the phy registers. refer to section 10.3, "phy management interface (pmi)," on page 128 for information on the pmi. note: the virtual phy registers are not accessible via these registers. 13.2.5.1 phy management interface data register (pmi_data) this register is used in conjunction with the phy management interface access register (pmi_access) to perform read and write operations to the phys. note: the virtual phy registers are not accessible via these registers. offset: 0a4h size: 32 bits bits description type default 31:16 reserved ro - 15:0 mii data this field contains the value read from or written to the phys. for a write operation, this register should be first written with the desired data. for a read operation, the pmi_access regist er is first written and once the command is finished, this register will contain the return data. note: upon a read, the value returned depends on the mii write (miiwnr) bit in the phy management interface access register (pmi_access) . if mii write (miiwnr) is 0, the data is from the phy. if mii write (miiwnr) is 1, the data is the value that was last written into this register. r/w 0000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 171 revision 1.5 (07-08-11) datasheet 13.2.5.2 phy manageme nt interface access register (pmi_access) this register is used to control the mana gement cycles to the phys. a phy access is initiated when this register is written. this register is used in conjunction with the phy management interface data register (pmi_data) to perform read and write operations to the phys. note: the virtual phy registers are not accessible via these registers. offset: 0a8h size: 32 bits bits description type default 31:16 reserved ro - 15:11 phy address (phy_addr) these bits select the phy devi ce being accesse d. refer to section 7.1.1, "phy addressing," on page 90 for information on phy address assignments. r/w 00000b 10:6 mii register index (miirinda) these bits select the desired mii register in the phy. refer to section 13.3, "ethernet phy control and status registers," on page 194 for detailed descriptions on all phy registers. r/w 00000b 5:2 reserved ro - 1 mii write (miiwnr) setting this bit informs the phy that the access will be a write operation using the phy management interface data register (pmi_data) . if this bit is cleared, the access will be a read operation, returning data into the phy management interface data register (pmi_data) . r/w 0b 0 mii busy (miibzy) this bit must be read as 0 before writing to the phy management interface data register (pmi_data) or phy management interface access register (pmi_access) registers. this bit is automatically set when this register is written. during a phy register access, this bit will be set, signifying a read or write access is in progress. this is a self-clearing (sc) bit that will return to 0 when the phy register access has completed. during a phy register write, the phy management interface data register (pmi_data) must be kept valid until this bit is cleared. during a phy register read, the phy management interface data register (pmi_data) register is invalid until the mac has cleared this bit. ro sc 0b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 172 smsc lan9303/lan9303i datasheet 13.2.6 virtual phy this section details the virtual phy system csr s. these registers provide status and control information similar to that of a real phy while maintaining ieee 802.3 compatibility. the virtual phy registers are addressable via the memory map, as described in table 13.2 , as well as serially via the mii management protocol (ieee 802.3 clause 22). when accessed serially, these registers are accessed through the mii management pins (in phy modes only) via the mii serial management protocol specifie d in ieee 802.3 clause 22. see section 2.3, "modes of operation," on page 19 for a detailed description of the various device modes. when being accessed serially, the virtual phy will respond when the phy address equals the address assigned by the phy_addr_sel_strap configuration strap, as defined in section 7.1.1, "phy addressing," on page 90 . a list of all virtual phy register indexes for serial access can be seen in table 13.5 . for more information on the virtual phy access modes, refer to section section 13.3 . for virtual phy functionality and operation information, see section 7.3, "virtual phy," on page 104 . note: all virtual phy registers follow the ieee 802.3 (clause 22.2.4) specified mii management register set. all functionality and bit definitions comply with these standards. the ieee 802.3 specified register index (in decimal) is in cluded under the memory mapped offset of each virtual phy register as a reference. for addi tional information, refer to the ieee 802.3 specification. note: when serially accessed, the virtual phy registers are only 16-bits wide, as is standard for mii management of phys. table 13.5 virtual phy mii serially adressable register index index # symbol register name 0 vphy_basic_ctrl virtual phy basic control register, section 13.2.6.1 1 vphy_basic_status virtual phy basic status register, section 13.2.6.2 2 vphy_id_msb virtual phy identification msb register, section 13.2.6.3 3 vphy_id_lsb virtual phy identification lsb register, section 13.2.6.4 4 vphy_an_adv virtual phy auto-negotiation advertisement register, section 13.2.6.5 5 vphy_an_lp_base_ability virtual phy auto-negotiation link partner base page ability register, section 13.2.6.6 6 vphy_an_exp virtual phy auto-negotiation expansion register, section 13.2.6.7 31 vphy_spec_ctrl_status virtual phy special control/status register, section 13.2.6.8 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 173 revision 1.5 (07-08-11) datasheet 13.2.6.1 virtual phy basic control register (vphy_basic_ctrl) this read/write register is used to configure the virtual phy. note: this register is re-written in its entirety by the eeprom loader following the release or reset or a reload command. refer to section 8.4, "eeprom loader," on page 115 for more information. offset: index (decimal): 1c0h 0 size: 32 bits bits description type default 31:16 reserved (see note 13.17 ) ro - 15 reset (vphy_rst) when set, this bit resets all the virtual phy registers to their default state. this bit is self clearing. 0: normal operation 1: reset r/w sc 0b 14 loopback (vphy_loopback) this bit enables/disables the loopback mode. when enabled, transmissions from the external mac are not sent to the switch fabric. instead, they are looped back onto the receive path. 0: loopback mode disabled (normal operation) 1: loopback mode enabled r/w 0b 13 speed select lsb (vphy_speed_sel_lsb) this bit is used to set the speed of the virtual phy when the auto- negotiation (vphy_an) bit is disabled. 0: 10 mbps 1: 100/200 mbps r/w 0b 12 auto-negotiation (vphy_an) this bit enables/disables auto-negotiation. when enabled, the speed select lsb (vphy_speed_sel_lsb) and duplex mode (vphy_duplex) bits are overridden. 0: auto-negotiation disabled 1: auto-negotiation enabled r/w 1b 11 power down (vphy_pwr_dwn) this bit is not used by the virtual phy and has no effect. r/w 0b 10 isolate (vphy_iso) this bit controls the mii input/output pins. when set and in mii/rmii phy mode, the mii output pins are not driven, mii pull-ups and pull-downs are disabled and the input pins are ignored. when in mac mode, this bit is ignored and has no effect. ( note 13.18 ) 0: non-isolated (normal operation) 1: isolated r/w 0b 9 restart auto-negotiation (vphy_rst_an) when set, this bit updates the emulated auto-negotiation results. 0: normal operation 1: auto-negotiation restarted r/w sc 0b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 174 smsc lan9303/lan9303i datasheet note 13.17 the reserved bits 31-16 are used to pad the register to 32-bits so that each register is on a dword boundary. when accessed serially (through the mii management protocol), the register is 16-bits wide. note 13.18 the isolation does not apply to the mii management pins (mdio). 8 duplex mode (vphy_duplex) this bit is used to set the duplex when the auto-negotiation (vphy_an) bit is disabled. 0: half duplex 1: full duplex r/w 0b 7 collision test (vphy_col_test) this bit enables/disables the collisi on test mode. when set, the collision signal to the external mac is active during transmission from the external mac. note: it is recommended that this bit be used only when in loopback mode. 0: collision test mode disabled 1: collision test mode enabled r/w 0b 6 speed select msb (vphy_speed_sel_msb) this bit is not used by the virtual phy and has no effect. the value returned is always 0. ro 0b 5:0 reserved ro - bits description type default downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 175 revision 1.5 (07-08-11) datasheet 13.2.6.2 virtual phy basic status register (vphy_basic_status) this register is used to monitor the status of the virtual phy. offset: index (decimal): 1c4h 1 size: 32 bits bits description type default 31:16 reserved (see note 13.19 ) ro - 15 100base-t4 this bit displays the status of 100base-t4 compatibility. 0: phy not able to perform 100base-t4 1: phy able to perform 100base-t4 ro 0b note 13.20 14 100base-x full duplex this bit displays the status of 100base-x full duplex compatibility. 0: phy not able to perf orm 100base-x full duplex 1: phy able to perfor m 100base-x full duplex ro 1b 13 100base-x half duplex this bit displays the status of 100base-x half duplex compatibility. 0: phy not able to perf orm 100base-x half duplex 1: phy able to perfor m 100base-x half duplex ro 1b 12 10base-t full duplex this bit displays the status of 10base-t full duplex compatibility. 0: phy not able to perf orm 10base-t full duplex 1: phy able to perfor m 10base-t full duplex ro 1b 11 10base-t half duplex this bit displays the status of 10base-t half duplex compatibility. 0: phy not able to perform 10base-t half duplex 1: phy able to perform 10base-t half duplex ro 1b 10 100base-t2 full duplex this bit displays the status of 100base-t2 full duplex compatibility. 0: phy not able to perform 100base-t2 full duplex 1: phy able to perform 100base-t2 full duplex ro 0b note 13.20 9 100base-t2 half duplex this bit displays the status of 100base-t2 half duplex compatibility. 0: phy not able to perform 100base-t2 half duplex 1: phy able to perform 100base-t2 half duplex ro 0b note 13.20 8 extended status this bit displays whether extended status information is in register 15 (per ieee 802.3 clause 22.2.4). 0: no extended status information in register 15 1: extended status information in register 15 ro 0b note 13.21 7 reserved ro - downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 176 smsc lan9303/lan9303i datasheet note 13.19 the reserved bits 31-16 are used to pad the register to 32-bits so that each register is on a dword boundary. when accessed serially (through the mii management protocol), the register is 16-bits wide. note 13.20 the virtual phy supports 100base-x (half and full duplex) and 10base-t (half and full duplex) only. all other modes will always return as 0 (unable to perform). note 13.21 the virtual phy does not support register 15 or 1000 mb/s operation. thus this bit is always returned as 0. note 13.22 the auto-negotiation complete bit is first cleared on a reset, but set shortly after (when the auto-negotiation process is run). refer to section 7.3.1, "virtual phy auto- negotiation," on page 104 for additional details. note 13.23 the virtual phy never has remote faults, its link is always up, and does not detect jabber. note 13.24 the virtual phy supports basic and some extended register capability. the virtual phy supports registers 0-6 (per the ieee 802.3 specification). 6 mf preamble suppression this bit indicates whether the virtual phy accepts management frames with the preamble suppressed. 0: management frames with preamble suppressed not accepted 1: management frames with preamble suppressed accepted ro 0b 5 auto-negotiation complete this bit indicates the status of the auto-negotiation process. 0: auto-negotiation process not completed 1: auto-negotiation process completed ro 1b note 13.22 4 remote fault this bit indicates if a remote fault condition has been detected. 0: no remote faul t condition detected 1: remote fault condition detected ro 0b note 13.23 3 auto-negotiation ability this bit indicates the status of the virtual phys auto-negotiation. 0: virtual phy is unable to perform auto-negotiation 1: virtual phy is able to perform auto-negotiation ro 1b 2 link status this bit indicates the status of the link. 0: link is down 1: link is up ro 1b note 13.23 1 jabber detect this bit indicates the status of the jabber condition. 0: no jabber condition detected 1: jabber condition detected ro 0b note 13.23 0 extended capability this bit indicates whether extended register capability is supported. 0: basic register set capabilities only 1: extended register set capabilities ro 1b note 13.24 bits description type default downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 177 revision 1.5 (07-08-11) datasheet 13.2.6.3 virtual phy identificati on msb register (vphy_id_msb) this read/write register contains the msb of the virtual phy organizationally unique identifier (oui). the lsb of the virtual phy oui is contained in the virtual phy identification lsb register (vphy_id_lsb) . note 13.25 the reserved bits 31-16 are used to pad the register to 32-bits so that each register is on a dword boundary. when accessed serially (through the mii management protocol), the register is 16-bits wide. note 13.26 ieee allows a value of zero in each of the 32-bits of the phy identifier. offset: index (decimal): 1c8h 2 size: 32 bits bits description type default 31:16 reserved (see note 13.25 ) ro - 15:0 phy id this field contains the msb of the virtual phy oui ( note 13.26 ). r/w 0000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 178 smsc lan9303/lan9303i datasheet 13.2.6.4 virtual phy identificati on lsb register (vphy_id_lsb) this read/write register contains the lsb of the virtual phy organizationally unique identifier (oui). the msb of the virtual phy oui is contained in the virtual phy identification msb register (vphy_id_msb) . note 13.27 the reserved bits 31-16 are used to pad the register to 32-bits so that each register is on a dword boundary. when accessed serially (through the mii management protocol), the register is 16-bits wide. note 13.28 ieee allows a value of zero in each of the 32-bits of the phy identifier. offset: index (decimal): 1cch3 size: 32 bits bits description type default 31:16 reserved (see note 13.27 ) ro - 15:10 phy id this field contains the lower 6-bits of the virtual phy oui ( note 13.28 ). r/w 000000b 9:4 model number this field contains the 6-bit manufacturers model number of the virtual phy ( note 13.28 ). r/w 000000b 3:0 revision number this field contain the 4-bit manufacturers revision number of the virtual phy ( note 13.28 ). r/w 0000b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 179 revision 1.5 (07-08-11) datasheet 13.2.6.5 virtual phy auto-negotiation advertisement register (vphy_an_adv) this read/write register contains the advertised ability of the virtual phy and is used in the auto- negotiation process with the link partner. note: this register is re-written in its entirety by the eeprom loader following the release or reset or a reload command. refer to section 8.4, "eeprom loader," on page 115 for more information. offset: index (decimal): 1d0h 4 size: 32 bits bits description type default 31:16 reserved (see note 13.29 ) ro - 15 next page this bit determines the advertised next page capability and is always 0. 0: virtual phy does not advertise next page capability 1: virtual phy advertises next page capability ro 0b note 13.30 14 reserved ro - 13 remote fault this bit is not used since there is no physical link partner. ro 0b note 13.31 12 reserved ro - 11 asymmetric pause this bit determines the advertised asymmetric pause capability. 0: no asymmetric pause toward link partner advertised 1: asymmetric pause toward link partner advertised r/w note 13.32 10 symmetric pause this bit determines the advertised symmetric pause capability. 0: no symmetric pause toward link partner advertised 1: symmetric pause toward link partner advertised r/w note 13.32 9 100base-t4 this bit determines the advertised 100base-t4 capability and is always 0. 0: 100base-t4 ability not advertised 1: 100base-t4 ability advertised ro 0b note 13.33 8 100base-x full duplex this bit determines the advertised 100base-x full duplex capability. 0: 100base-x full duplex ability not advertised 1: 100base-x full duplex ability advertised r/w 1b 7 100base-x half duplex this bit determines the advertised 100base-x half duplex capability. 0: 100base-x half duplex ability not advertised 1: 100base-x half duplex ability advertised r/w 1b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 180 smsc lan9303/lan9303i datasheet note 13.29 the reserved bits 31-16 are used to pad the register to 32-bits so that each register is on a dword boundary. when accessed serially (through the mii management protocol), the register is 16-bits wide. note 13.30 the virtual phy does not support next page capability. this bit value will always be 0. note 13.31 the remote fault bit is not useful since there is no actual link partner to send a fault to. note 13.32 the symmetric pause and asymmetric pause bits default to 1 if the manual_fc_strap_0 strap is low (both symmetric and asym metric are advertised), and 0 if the manual_fc_strap_0 strap is high (neither symmetric and asymmetric are advertised). configuration strap values are latched upon the de-assertion of a chip-level reset as described in section 4.2.4, "configuration straps," on page 46 . note 13.33 virtual 100base-t4 is not supported. note 13.34 the virtual phy supports only ieee 802.3. only a value of 00001b should be used in this field. 6 10base-t full duplex this bit determines the advertised 10base-t full duplex capability. 0: 10base-t full duplex ability not advertised 1: 10base-t full duplex ability advertised r/w 1b 5 10base-t half duplex this bit determines the advertised 10base-t half duplex capability. 0: 10base-t half duplex ability not advertised 1: 10base-t half duplex ability advertised r/w 1b 4:0 selector field this field identifies the type of message being sent by auto-negotiation. 00001: ieee 802.3 r/w 00001b note 13.34 bits description type default downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 181 revision 1.5 (07-08-11) datasheet 13.2.6.6 virtual phy auto-negotiation link partner ba se page ability register (vphy_an_lp_base_ability) this read-only register contains t he advertised ability of the link partners phy and is used in the auto- negotiation process with the virtual phy. because the virtual phy does not physically connect to an actual link partner, the values in this register are emulated as described below. offset: index (decimal): 1d4h 5 size: 32 bits bits description type default 31:16 reserved (see note 13.35 ) ro - 15 next page this bit indicates the emulated link partner phy next page capability and is always 0. 0: link partner phy does not advertise next page capability 1: link partner phy advertises next page capability ro 0b note 13.36 14 acknowledge this bit indicates whether the link code word has been received from the partner and is always 1. 0: link code word not yet received from partner 1: link code word received from partner ro 1b note 13.36 13 remote fault since there is no physical link partner, this bit is not used and is always returned as 0. ro 0b note 13.36 12 reserved ro - 11 asymmetric pause this bit indicates the emulated li nk partner phy asymmetric pause capability. 0: no asymmetric pause toward link partner 1: asymmetric pause toward link partner ro note 13.37 10 pause this bit indicates the emulated link partner phy symmetric pause capability. 0: no symmetric pause toward link partner 1: symmetric pause toward link partner ro note 13.37 9 100base-t4 this bit indicates the emulated link partner phy 100base-t4 capability. this bit is always 0. 0: 100base-t4 ability not supported 1: 100base-t4 ability supported ro 0b note 13.36 8 100base-x full duplex this bit indicates the emulated link partner phy 100base-x full duplex capability. 0: 100base-x full duplex ability not supported 1: 100base-x full duplex ability supported ro note 13.38 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 182 smsc lan9303/lan9303i datasheet note 13.35 the reserved bits 31-16 are used to pad the register to 32-bits so that each register is on a dword boundary. when accessed serially (through the mii management protocol), the register is 16-bits wide. note 13.36 the emulated link partner does not support next page, always instantly sends its link code word, never sends a fault, and do es not support 100base-t4. note 13.37 the emulated link partners asymmetric/symmetric pause ability is based upon the values of the asymmetric pause and symmetric pause bits of the virtual phy auto-negotiation advertisement register (vphy_an_adv) . thus the emulated link partner always accommodates the request of the virtual phy, as shown in ta b l e 1 3 . 6 . the link partner pause ability bits are determined when auto-negotiation is complete. changing the virtual phy auto-negotiation advertisement register (vphy_an_adv) will have no affect until the auto-negotiation process is re-run. if the local device advertises both symmetric and asymmetric pause, th e result is determined based on the fd_fc_strap_0 configuration strap. this allows the user the choice of network emulation. if fd_fc_strap_0 = 1, then the result is symmetrical, else asymmetrical. see section 7.3.1, "virtual phy auto-negotiation," on page 104 for additional information. 7 100base-x half duplex this bit indicates the emulated link partner phy 100base-x half duplex capability. 0: 100base-x half duplex ability not supported 1: 100base-x half duplex ability supported ro note 13.38 6 10base-t full duplex this bit indica tes the emulated li nk partner phy 10base-t full duplex capability. 0: 10base-t full duplex ability not supported 1: 10base-t full duplex ability supported ro note 13.38 5 10base-t half duplex this bit indi cates the emulated link partner phy 10base-t half duplex capability. 0: 10base-t half duplex ability not supported 1: 10base-t half duplex ability supported ro note 13.38 4:0 selector field this field identifies the type of message being sent by auto-negotiation. 00001: ieee 802.3 ro 00001b table 13.6 emulated link partner pause flow control ability default values vphy symmetric pause (register 4.10) vphy asymmetric pause (register 4.11) fd_fc_strap_0 link partner symmetric pause (register 5.10) link partner asymmetric pause (register 5.11) no flow control enabled 0 0 x 0 0 symmetric pause 1 0 x 1 0 asymmetric pause towards switch 01x11 bits description type default downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 183 revision 1.5 (07-08-11) datasheet note 13.38 the emulated link partners ability is based on the p0_duplex pin, duplex_pol_strap_0 , and speed_strap_0 , as well as on the auto-negotiation success. table 13.7 defines the default capabilities of the emulated link partner as a function of these signals. configuration strap values are latched upon the de-assertion of a chip-level reset as described in section 4.2.4, "configuration straps," on page 46 . for more information on the virtual phy auto- negotiation, see section 7.3.1, "virtual phy auto-negotiation," on page 104 . asymmetric pause to w a r d s m a c 11001 s y m m e t r i c p a u s e11111 table 13.7 emulated link partner default advertised ability speed_strap_0 advertised link partner ability (bits 8,7,6,5) p0_duplex = duplex_pol_strap_0 0 10base-t full-duplex (0010) 1 100base-x full-duplex (1000) p0_duplex != duplex_pol_strap_0 0 10base-t half -duplex (0001) 1 100base-x half-duplex (0100) table 13.6 emulated link partner pause flow control ability default values vphy symmetric pause (register 4.10) vphy asymmetric pause (register 4.11) fd_fc_strap_0 link partner symmetric pause (register 5.10) link partner asymmetric pause (register 5.11) downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 184 smsc lan9303/lan9303i datasheet 13.2.6.7 virtual phy auto-negotiation expansion register (vphy_an_exp) this register is used in the auto-negotiation process. note 13.39 the reserved bits 31-16 are used to pad the register to 32-bits so that each register is on a dword boundary. when accessed serially (through the mii management protocol), the register is 16-bits wide. note 13.40 since the virtual phy link partner is emulated, there is never a parallel detection fault and this bit is always 0. note 13.41 next page ability is not supported by the virtual phy or emulated link partner. note 13.42 the page received bit is clear when read. it is first cleared on reset, but set shortly thereafter when the auto-negotiation process is run. note 13.43 the emulated link partner will show auto-negotiation able unless auto-negotiation fails (no common bits between the advertised ability and the link partner ability). offset: index (decimal): 1d8h 6 size: 32 bits bits description type default 31:16 reserved (see note 13.39 ) ro - 15:5 reserved ro - 4 parallel detection fault this bit indicates whether a parallel detection fault has been detected. this bit is always 0. 0: a fault hasnt been detected via the parallel detection function 1: a fault has been detected vi a the parallel detection function ro 0b note 13.40 3 link partner next page able this bit indicates whether the link partner has next page ability. this bit is always 0. 0: link partner does not contain next page capability 1: link partner contains next page capability ro 0b note 13.41 2 local device next page able this bit indicates whether the local device has next page ability. this bit is always 0. 0: local device does not contain next page capability 1: local device contains next page capability ro 0b note 13.41 1 page received this bit indicates the reception of a new page. 0: a new page has not been received 1: a new page has been received ro/lh 1b note 13.42 0 link partner auto -negotiation able this bit indicates the auto-negotiation ability of the link partner. 0: link partner is not auto-negotiation able 1: link partner is auto-negotiation able ro 1b note 13.43 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 185 revision 1.5 (07-08-11) datasheet 13.2.6.8 virtual phy special control/status register (v phy_special_control_status) this read/write register contains a current link speed/duplex indicator and sqe control. offset: index (decimal): 1dch31 size: 32 bits bits description type default 31:16 reserved (see note 13.44 ) ro - 15 reserved ro - 14 switch looopback port 0 when set, transmissions from the switch fabric port 0 are not sent to the external mac. instead, they are looped back into the switch engine. from the mac viewpoint, this is effectively a far loopback. if loopback is enabled during half-duplex operation, then the enable receive own transmit bit in the port x mac receive configuration register (mac_rx_cfg_x) must be set for this port. otherwise, the switch fabric will ignore receive activity when transmitting in half-duplex mode. note: this mode works even if the isolate (vphy_iso) bit of the virtual phy basic control regist er (vphy_basic_ctrl) is set. r/w 0b 13:11 reserved ro - 10 turbo mii enable when set, this bit changes the data rate of the mii phy 100mbps mode to 200mbps. the normal virtual phy selection mechanism that chooses between 10 and 100mbps will instead choose between 10mbps and 200mbps. note: when operating at 200mbps, the drive strength of the mii output clocks is selected using the rmii/turbo mii clock strength bit. when at 100 mbps or 10 mbps, the drive strength is fixed at 12 ma. r/w note 13.45 9:8 mode this field indicates the operating mode of port 0. 00: mii mac mode 01: mii phy mode 10: rmii phy mode 11: reserved ro note 13.46 7 switch collision test port 0 when set, the collision signal to the switch fabric port 0 is active during transmission from the switch engine. note: it is recommended that this bit be used only when using loopback mode. r/w 0b 6 rmii clock direction 0: selects p0_outclk as an input 1: selects p0_outclk as an output r/w nasr note 13.50 note 13.47 5 rmii/turbo mii clock strength for rmii and 200 mbps mii phy modes, a low selects 12 ma drive while a high selects a 16 ma drive. for 100 mbps and 10 mbps mii phy modes, the drive strength is fixed at 12ma. r/w nasr note 13.50 note 13.48 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 186 smsc lan9303/lan9303i datasheet note 13.44 the reserved bits 31-16 are used to pad the register to 32-bits so that each register is on a dword boundary. when accessed serially (through the mii management protocol), the register is 16-bits wide. note 13.45 the default value of this field is determined via the turbo_mii_enable_strap_0 configuration strap. refer to section 4.2.4, "configuration straps," on page 46 for additional information. note 13.46 the default value of this field is determined via the p0_mode_strap[1:0] configuration straps. refer to section 4.2.4, "configuration straps," on page 46 for additional information. note 13.47 the default value of this field is determined via the p0_rmii_clock_dir_strap configuration strap. refer to section 4.2.4, "configuration straps," on page 46 for additional information. note 13.48 the default value of this field is determined via the p0_clock_strength_strap configuration strap. refer to section 4.2.4, "configuration straps," on page 46 for additional information. note 13.49 the default value of this field is the result of the auto-negotiation process if the auto- negotiation (vphy_an) bit of the virtual phy basic control register (vphy_basic_ctrl) is set. otherwise, this field reflects the speed select lsb (vphy_speed_sel_lsb) and duplex mode (vphy_duplex) bit settings of the vphy_basic_ctrl register. refer to section 7.3.1, "virtual phy auto-negotiation," on page 104 for information on the auto-negotiation determination process of the virtual phy. note 13.50 register bits designated as nasr are reset when the virtual phy reset is generated via the reset control register (reset_ctl) . the nasr designation is only applicable when the reset (vphy_rst) bit of the virtual phy basic control register (vphy_basic_ctrl) is set. note 13.51 the default value of this field is determined via the sqe_test_disable_strap_0 configuration strap. refer to section 4.2.4, "configuration straps," on page 46 for additional information. 4:2 current speed/duplex indication this field indicates the current speed and duplex of the virtual phy link. ro note 13.49 1 reserved ro - 0 sqeoff this bit enables/disables the signal quality error (heartbeat) test. 0: sqe test enabled 1: sqe test disabled note: this bit is used when port 0 is in mii phy mode. it is not usable in rmii phy or mii mac modes. r/w nasr note 13.50 note 13.51 bits description type default [4] [3] [2] speed duplex 0 0 0 reserved 0 0 1 10mbps half-duplex 0 1 0 100/200mbps half-duplex 0 1 1 reserved 1 0 0 reserved 1 0 1 10mbps full-duplex 1 1 0 100/200mbps full-duplex 1 1 1 reserved downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 187 revision 1.5 (07-08-11) datasheet 13.2.7 miscellaneous this section details the remainder of the system csrs. these registers allow for monitoring and configuration of various functions such as the chip id/revision, byte order testing, hardware configuration, general purpose timer, and free running counter. 13.2.7.1 chip id and revision (id_rev) this read-only register contains the id and revision fields for the device. note 13.52 default value is dependent on device revision. offset: 050h size: 32 bits bits description type default 31:16 chip id this field indicates the chip id. ro 9303h 15:0 chip revision this field indicates the design revision. ro note 13.52 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 188 smsc lan9303/lan9303i datasheet 13.2.7.2 byte order test register (byte_test) this read-only register can be used to determine the byte ordering of the current configuration. note: this register can be read while the device is in the not ready state. this register can also be polled while the device is in the reset state without causing any damaging effects. the returned data will be invalid since the serial interfaces are also in the reset state at this time. however, the returned data will not match the normal valid data pattern during reset. note: in smi mode, either half of this register can be read without the need to read the other half. offset: 064h size: 32 bits bits description type default 31:0 byte test (byte_test) this field reflects the current byte ordering ro 87654321h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 189 revision 1.5 (07-08-11) datasheet 13.2.7.3 hardware configuration register (hw_cfg) this register allows the configuration of various hardware features. note: this register can be polled while the device is in the reset or not ready state ( device ready (ready) bit is cleared). returned data will be in valid during the reset state since the serial interfaces are also in reset at this time. note: in smi mode, either half of this register can be read without the need to read the other half. note 13.53 the default value of this field is determined by the configuration strap auto_mdix_strap_2 . see section 4.2.4, "configuration straps," on page 46 for more information. note 13.54 the default value of this field is determined by the configuration strap auto_mdix_strap_1 . see section 4.2.4, "configuration straps," on page 46 for more information. offset: 074h size: 32 bits bits description type default 31:28 reserved ro - 27 device ready (ready) when set, this bit indicates that the device is ready to be accessed. upon power-up, nrst reset, or digital reset, the host processor may interrogate this field as an indication that the device has stabilized and is fully active. this bit can cause an interrupt if enabled. note: with the exception of the hw_cfg, byte_test, and reset_ctl registers, read access to any internal resources is forbidden while the ready bit is cleared. writes to any address are invalid until this bit is set. ro 0b 26 amdix_en strap state port 2 this bit reflects the state of the auto_mdix_strap_2 strap that connects to the phy. the strap value is loaded with the level of the auto_mdix_strap_2 during reset and can be re-written by the eeprom loader. the strap value can be overridden by the auto-mdix contro l (amdixctrl) and auto-mdix state (amdixstate) bits of the port 2 phy special control/status indication register ( section 13.3.2.10 ). ro note 13.53 25 amdix_en strap state port 1 this bit reflects the state of the auto_mdix_strap_1 strap that connects to the phy. the strap value is loaded with the level of the auto_mdix_strap_1 during reset and can be re-written by the eeprom loader. the strap value can be overridden by the auto-mdix contro l (amdixctrl) and auto-mdix state (amdixstate) bits of the port 1 phy special control/status indication register ( section 13.3.2.10 ). ro note 13.54 24:0 reserved ro - downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 190 smsc lan9303/lan9303i datasheet 13.2.7.4 general purpose timer configuration register (gpt_cfg) this read/write register configures the general purpose timer (gpt). the gpt can be configured to generate host interrupts at the interval defined in this register. the current value of the gpt can be monitored via the general purpose timer count register (gpt_cnt) . refer to section 11.1, "general purpose timer," on page 134 for additional information. offset: 08ch size: 32 bits bits description type default 31:30 reserved ro - 29 general purpose timer enable (timer_en) this bit enables the gpt. when set, the gpt enters the run state. when cleared, the gpt is halted. on the 1 to 0 transition of this bit, the gpt_load field of this register will be preset to ffffh. 0: gpt disabled 1: gpt enabled r/w 0b 28:16 reserved ro - 15:0 general purpose timer pre-load (gpt_load) this value is pre-loaded into the gpt. this is the starting value of the gpt. the timer will begin decrementing from this value when enabled. r/w ffffh downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 191 revision 1.5 (07-08-11) datasheet 13.2.7.5 general purpose timer count register (gpt_cnt) this read-only register reflects the current genera l purpose timer (gpt) value. the register should be used in conjunction with the general purpose timer configuration register (gpt_cfg) to configure and monitor the gpt. refer to section 11.1, "general purpose timer," on page 134 for additional information. offset: 090h size: 32 bits bits description type default 31:16 reserved ro - 15:0 general purpose timer current count (gpt_cnt) this 16-bit field represents the current value of the gpt. ro ffffh downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 192 smsc lan9303/lan9303i datasheet 13.2.7.6 free running 25mhz counter register (free_run) this read-only register reflects the current va lue of the free-running 25mhz counter. refer to section 11.2, "free-running clock," on page 134 for additional information. offset: 09ch size: 32 bits bits description type default 31:0 free running counter (fr_cnt) this field reflects the current value of the free-running 32-bit counter. at reset, the counter starts at zero and is incremented by one every 25mhz cycle. when the maximum count has been reached, the counter will rollover to zero and continue counting. note: the free running counter can take up to 160ns to clear after a reset event. ro 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 193 revision 1.5 (07-08-11) datasheet 13.2.7.7 reset control register (reset_ctl) this register contains software controlled resets. note: this register can be read while the device is in the not ready state. this register can also be polled while the device is in the reset state without causing any damaging effects. however, the returned data will be invalid since the serial interfaces are also in the reset state at this time. note: in smi mode, either half of this register can be read without the need to read the other half. offset: 1f8h size: 32 bits bits description type default 31:4 reserved ro - 3 virtual phy reset (vphy_rst) setting this bit resets the virtual phy. when the virtual phy is released from reset, this bit is automatically cleared. all writes to this bit are ignored while this bit is set. note: this bit is not accessible via the eeprom loader. r/w sc 0b 2 port 2 phy reset (phy2_rst) setting this bit resets the port 2 phy. the internal logic automatically holds the phy reset for a minimum of 102us. when the port 2 phy is released from reset, this bit is automatically cleared. all writes to this bit are ignored while this bit is set. note: this bit is not accessible via the eeprom loader. r/w sc 0b 1 port 1 phy reset (phy1_rst) setting this bit resets the port 1 phy. the internal logic automatically holds the phy reset for a minimum of 102us. when the port 1 phy is released from reset, this bit is automatically cleared. all writes to this bit are ignored while this bit is set. note: this bit is not accessible via the eeprom loader. r/w sc 0b 0 digital reset (digital_rst) setting this bit resets the complete chip except the pll, virtual phy, port 1 phy, and port 2 phy. the eeprom loa der will automatica lly reload the configuration following this reset, but will not reset the virtual phy, port 1 phy, or port 2 phy. if desired, the above phy resets can be issued once the device is configured. all system csrs are reset exce pt for any nasr type bits. any in progress eeprom commands (including reload) are terminated. when the chip is released from reset, this bit is automatically cleared. the byte order test register (byte_test) should be polled to determine when the reset is complete. all writes to this bit are ignored while this bit is set. note: this bit is not accessible via the eeprom loader. r/w sc 0b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 194 smsc lan9303/lan9303i datasheet 13.3 ethernet phy cont rol and status registers this section details the various ethernet phy control and status registers. the device contains three phys: port 1 phy, port 2 phy and a virtual phy. all phy registers follow the ieee 802.3 (clause 22.2.4) specified mii management register set. all functionality and bit definitions comply with these standards. the ieee 802.3 specified register index (in decimal) is included with each register definition, allowing for addressing of these registers via the mii serial management protocol. for additional information on the mii management protocol, refer to the ieee 802.3 specification. each individual phy is assigned a unique phy address as detailed in section 7.1.1, "phy addressing," on page 90 . 13.3.1 virtual phy registers the virtual phy provides a basic mii managem ent interface for communication with an standard external mac as if it was attached to a single port phy. the virtual phy registers differ from the port 1 & 2 phy registers in that they are addressable via the memory map, as described in table 13.2 , as well as serially. these modes of access are described in section 13.2.6, "virtual phy," on page 172 . because the virtual phy registers are also memory mapped, their definitions have been included in the system control and status registers section 13.2.6, "virtual phy," on page 172 . a list of the virtual phy mii addressable regi sters and their correspond ing register index numbers is also included in table 13.5 . note: when serially accessed, the virtual phy registers are only 16-bits wide, as is standard for mii management of phys. 13.3.2 port 1 & 2 phy registers the port 1 and port 2 phys are comparable in functionality and have an identical set of non-memory mapped registers. the port 1 and port 2 phy registers are not memory mapped. these registers are indirectly accessed through the phy management interface access register (pmi_access) and phy management interface data register (pmi_data) registers (in mac or phy i 2 c modes only) or through the mii management pins (in mac or phy smi modes only) via the mii serial management protocol specifie d in ieee 802.3 clause 22. see section 2.3, "modes of operation," on page 19 for a details on the various device modes. because the port 1 & 2 phy registers are functionally identical, their register descriptions have been consolidated. a lowercase x has been appended to the end of each phy register name in this section, where x should be replaced with 1 or 2 for the port 1 phy or the port 2 phy registers respectively. a list of the port 1 & 2 phy mii addressable registers and their corresponding register index numbers is included in table 13.8 . each individual phy is assigned a unique phy address as detailed in section 7.1.1, "phy addressing," on page 90 . table 13.8 port 1 & 2 phy mii serially adressable registers index # symbol register name 0 phy_basic_control_x port x phy basic control register, section 13.3.2.1 1 phy_basic_status_x port x phy basic status register, section 13.3.2.2 2 phy_id_msb_x port x phy identification msb register, section 13.3.2.3 3 phy_id_lsb_x port x phy identification lsb register, section 13.3.2.4 4 phy_an_adv_x port x phy auto-negotiation advertisement register, section 13.3.2.5 5 phy_an_lp_base_ability_x port x phy auto-negotiation link partner base page ability register, section 13.3.2.6 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 195 revision 1.5 (07-08-11) datasheet 6 phy_an_exp_x port x phy auto-negotiation expansion register, section 13.3.2.7 17 phy_mode_control_status_x port x phy mode control/status register, section 13.3.2.8 18 phy_special_modes_x port x phy special modes register, section 13.3.2.9 27 phy_special_control_stat_ind_x port x phy special control/status indication register, section 13.3.2.10 29 phy_interrupt_source_x port x phy interrupt source flags register, section 13.3.2.11 30 phy_interrupt_mask_x port x phy interrupt mask register, section 13.3.2.12 31 phy_special_control_status_x port x phy special control/status register, section 13.3.2.13 table 13.8 port 1 & 2 phy mii serial ly adressable registers (continued) index # symbol register name downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 196 smsc lan9303/lan9303i datasheet 13.3.2.1 port x phy basic contro l register (phy_basic_control_x) this read/write register is used to configure the port x phy. note: this register is re-written in its entirety by the eeprom loader following the re lease of reset or a reload command. refer to section 8.4, "eeprom loader," on page 115 for additional information. index (decimal): 0 size: 16 bits bits description type default 15 reset (phy_rst) when set, this bit resets all the port x phy registers to their default state, except those marked as nasr type. this bit is self clearing. 0: normal operation 1: reset r/w sc 0b 14 loopback (phy_loopback) this bit enables/disables the loopback mode. when enabled, transmissions from the switch fabric are not sent to network. instead, they are looped back into the switch fabric. note: if loopback is enabled during half-duplex operation, then the enable receive own transmit bit in the port x mac receive configuration register (mac_rx_cfg_x) must be set for the specified port. otherwise, the switch fabric will ignore receive activity when transmitting in half-duplex mode. 0: loopback mode disabled (normal operation) 1: loopback mode enabled r/w 0b 13 speed select lsb (phy_speed_sel_lsb) this bit is used to set the speed of the port x phy when the auto- negotiation (phy_an) bit is disabled. 0: 10 mbps 1: 100 mbps r/w note 13.55 12 auto-negotiation (phy_an) this bit enables/disables auto-negotiation. when enabled, the speed select lsb (phy_speed_sel_lsb) and duplex mode (phy_duplex) bits are overridden. 0: auto-negotiation disabled 1: auto-negotiation enabled r/w note 13.56 11 power down (phy_pwr_dwn) this bit controls the power down mode of the port x phy. after this bit is cleared the phy may auto-negotiate with its partner station. this process can take up to a few seconds to complete. once auto-negotiation is complete, the auto-negotiation complete bit of the port x phy basic status register (phy_basic_status_x) will be set. note: the phy_an bit of this register must be cleared before setting this bit. 0: normal operation 1: general power down mode r/w 0b 10 reserved ro - downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 197 revision 1.5 (07-08-11) datasheet note 13.55 the default value of this bit is determined by the logical or of the auto-negotiation strap ( autoneg_strap_1 for port 1 phy, autoneg_strap_2 for port 2 phy) and the speed select strap ( speed_strap_1 for port 1 phy, speed_strap_2 for port 2 phy). essentially, if the auto-negotiation strap is set, the default value is 1, otherwise the default is determined by the value of the speed select strap. refer to section 4.2.4, "configuration straps," on page 46 for more information. note 13.56 the default value of this bit is the value of the auto-negotiation strap ( autoneg_strap_1 for port 1 phy, autoneg_strap_2 for port 2 phy). refer to section 4.2.4, "configuration straps," on page 46 for more information. note 13.57 the default value of this bit is determined by the logical and of the negation of the auto- negotiation strap ( autoneg_strap_1 for port 1 phy, autoneg_strap_2 for port 2 phy) and the duplex select strap ( duplex_strap_1 for port 1 phy, duplex_strap_2 for port 2 phy). essentially, if the auto-negotiation strap is set, the default value is 0, otherwise the default is determined by the value of the duplex select strap. refer to section 4.2.4, "configuration straps," on page 46 for more information. 9 restart auto-negotiation (phy_rst_an) when set, this bit restarts the auto-negotiation process. 0: normal operation 1: auto-negotiation restarted r/w sc 0b 8 duplex mode (phy_duplex) this bit is used to set the duplex when the auto-negotiation (phy_an) bit is disabled. 0: half duplex 1: full duplex r/w note 13.57 7 collision test mode (phy_col_test) this bit enables/disables the collision test mode of the port x phy. when set, the collision signal is active during transmission. it is recommended that this feature be used only in loopback mode. 0: collision test mode disabled 1: collision test mode enabled r/w 0b 6:0 reserved ro - bits description type default downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 198 smsc lan9303/lan9303i datasheet 13.3.2.2 port x phy basic status register (phy_basic_status_x) this register is used to monitor the status of the port x phy. index (decimal): 1 size: 16 bits bits description type default 15 100base-t4 this bit displays the status of 100base-t4 compatibility. 0: phy not able to perform 100base-t4 1: phy able to perform 100base-t4 ro 0b note 13.58 14 100base-x full duplex this bit displays the status of 100base-x full duplex compatibility. 0: phy not able to perf orm 100base-x full duplex 1: phy able to perfor m 100base-x full duplex ro 1b 13 100base-x half duplex this bit displays the status of 100base-x half duplex compatibility. 0: phy not able to perf orm 100base-x half duplex 1: phy able to perfor m 100base-x half duplex ro 1b 12 10base-t full duplex this bit displays the status of 10base-t full duplex compatibility. 0: phy not able to perf orm 10base-t full duplex 1: phy able to perfor m 10base-t full duplex ro 1b 11 10base-t half duplex this bit displays the status of 10base-t half duplex compatibility. 0: phy not able to perform 10base-t half duplex 1: phy able to perform 10base-t half duplex ro 1b 10 100base-t2 full duplex this bit displays the status of 100base-t2 full duplex compatibility. 0: phy not able to perform 100base-t2 full duplex 1: phy able to perform 100base-t2 full duplex ro 0b note 13.58 9 100base-t2 half duplex this bit displays the status of 100base-t2 half duplex compatibility. 0: phy not able to perform 100base-t2 half duplex 1: phy able to perform 100base-t2 half duplex ro 0b note 13.58 8:6 reserved ro - 5 auto-negotiation complete this bit indicates the status of the auto-negotiation process. 0: auto-negotiation process not completed 1: auto-negotiation process completed ro 0b 4 remote fault this bit indicates if a remote fault condition has been detected. 0: no remote faul t condition detected 1: remote fault condition detected ro/lh 0b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 199 revision 1.5 (07-08-11) datasheet note 13.58 the phy supports 100base-tx (half and full duplex) and 10base-t (h alf and full duplex) only. all other modes will always return as 0 (unable to perform). 3 auto-negotiation ability this bit indicates the status of the phys auto-negotiation. 0: phy is unable to perform auto -negotiation 1: phy is able to pe rform auto-negotiation ro 1b 2 link status this bit indicates the status of the link. 0: link is down 1: link is up ro/ll 0b 1 jabber detect this bit indicates the status of the jabber condition. 0: no jabber condition detected 1: jabber condition detected ro/lh 0b 0 extended capability this bit indicates whether extended register capability is supported. 0: basic register set capabilities only 1: extended register set capabilities ro 1b bits description type default downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 200 smsc lan9303/lan9303i datasheet 13.3.2.3 port x phy identification msb register (phy_id_msb_x) this read/write register contains the msb of the organizationally unique identifier (oui) for the port x phy. the lsb of the phy oui is contained in the port x phy identification lsb register (phy_id_lsb_x) . index (decimal): 2 size: 16 bits bits description type default 15:0 phy id this field is assigned to the 3rd through 18th bits of the oui, respectively (oui = 00800fh). r/w 0007h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 201 revision 1.5 (07-08-11) datasheet 13.3.2.4 port x phy identification lsb register (phy_id_lsb_x) this read/write register contains the lsb of the organizationally unique identifier (oui) for the port x phy. the msb of the phy oui is contained in the port x phy identification msb register (phy_id_msb_x) . index (decimal): 3 size: 16 bits bits description type default 15:10 phy id this field is assigned to the 19th through 24th bits of the phy oui, respectively. (oui = 00800fh). r/w 110000b 9:4 model number this field contains the 6-bit manufacturers model number of the phy. r/w 001101b 3:0 revision number this field contain the 4-bit manufacturers revision number of the phy. r/w 0001b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 202 smsc lan9303/lan9303i datasheet 13.3.2.5 port x phy auto-negotiation advertisement register (phy_an_adv_x) this read/write register contains the advertised ability of the port x phy and is used in the auto- negotiation process with the link partner. note: this register is re-written by the eeprom loader following the release of reset or a reload command. refer to section 8.4, "eeprom loader," on page 115 for additional information. index (decimal): 4 size: 16 bits bits description type default 15:14 reserved ro - 13 remote fault this bit determines if remote fault indication will be advertised to the link partner. 0: remote fault indi cation not advertised 1: remote fault in dication advertised r/w 0b 12 reserved note: this bit should be written as 0. r/w 0b 11 asymmetric pause this bit determines the advertised asymmetric pause capability. 0: no asymmetric pause toward link partner advertised 1: asymmetric pause toward link partner advertised r/w note 13.59 10 symmetric pause this bit determines the advertised symmetric pause capability. 0: no symmetric pause toward link partner advertised 1: symmetric pause toward link partner advertised r/w note 13.59 9 reserved ro - 8 100base-x full duplex this bit determines the advertised 100base-x full duplex capability. 0: 100base-x full duplex ability not advertised 1: 100base-x full duplex ability advertised r/w 1b 7 100base-x half duplex this bit determines the advertised 100base-x half duplex capability. 0: 100base-x half duplex ability not advertised 1: 100base-x half duplex ability advertised r/w 1b 6 10base-t full duplex this bit determines the advertised 10base-t full duplex capability. 0: 10base-t full duplex ability not advertised 1: 10base-t full duplex ability advertised r/w note 13.60 table 13.9 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 203 revision 1.5 (07-08-11) datasheet note 13.59 the asymmetric pause and symmetric pause bits are loaded into the phy registers by the eeprom loader. the default values of th e asymmetric pause and symmetric pause bits are determined by the manual flow control enable strap ( manual_fc_strap_1 for port 1 phy, manual_fc_strap_2 for port 2 phy). when the manual flow control enable strap is 0, the symmetric pause bit defaults to 1 and the asymmetric pause bit defaults to the setting of the full duplex flow control enable strap ( fd_fc_strap_1 for port 1 phy, fd_fc_strap_2 for port 2 phy). when the manual flow control enable strap is 1, both bits default to 0. configuration strap values are latched upon the de-assertion of a chip- level reset as described in section 4.2.4, "configuration straps," on page 46 . refer to section 4.2.4, "configuration straps," on page 46 for configuration strap definitions. note 13.60 the default value of this bit is determined by the logical or of the auto-negotiation enable strap ( autoneg_strap_1 for port 1 phy, autoneg_strap_2 for port 2 phy) with the logical and of the negated speed select strap ( speed_strap_1 for port 1 phy, speed_strap_2 for port 2 phy) and the duplex select strap ( duplex_strap_1 for port 1 phy, duplex_strap_2 for port 2 phy). table 13.9 defines the default behavior of this bit. configuration strap values are latched upon the de-assertion of a chip-level reset as described in section 4.2.4, "configuration straps," on page 46 . refer to section 4.2.4, "configuration straps," on page 46 for configuration strap definitions. note 13.61 the default value of this bit is determined by the logical or of the auto-negotiation enable strap ( autoneg_strap_1 for port 1 phy, autoneg_strap_2 for port 2 phy) and the negated speed select strap ( speed_strap_1 for port 1 phy, speed_strap_2 for port 2 phy). table 13.10 defines the default behavior of this bit. configuration strap values are latched upon the de-assertion of a chip-level reset as described in section 4.2.4, "configuration straps," on page 46 . refer to section 4.2.4, "configuration straps," on page 46 for configuration strap definitions. 5 10base-t half duplex this bit determines the advertised 10base-t half duplex capability. 0: 10base-t half duplex ability not advertised 1: 10base-t half duplex ability advertised r/w note 13.61 table 13.10 4:0 selector field this field identifies the type of message being sent by auto-negotiation. 00001: ieee 802.3 r/w 00001b table 13.9 10base-t full duplex advertisement default value autoneg_strap_x speed_strap_x duplex_stra p_x default 10base-t full duplex value 000 0 001 1 010 0 011 0 100 1 101 1 110 1 111 1 bits description type default downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 204 smsc lan9303/lan9303i datasheet table 13.10 10base-t half duplex advertisement bit default value autoneg_strap_x speed_strap_x default 10base-t half duplex value 00 1 01 0 10 1 11 1 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 205 revision 1.5 (07-08-11) datasheet 13.3.2.6 port x phy auto-negotiation link partner base page ability register (phy_an_lp_base_ability_x) this read-only register contains t he advertised ability of the link partners phy and is used in the auto- negotiation process between the link partner and the port x phy. index (decimal): 5 size: 16 bits bits description type default 15 next page this bit indicates the link partner phy page capability. 0: link partner phy does not advertise next page capability 1: link partner phy advertises next page capability ro 0b 14 acknowledge this bit indicates whether the link code word has been received from the partner. 0: link code word not yet received from partner 1: link code word received from partner ro 0b 13 remote fault this bit indicates whether a remote fault has been detected. 0: no remote fault 1: remote fault detected ro 0b 12 reserved ro - 11 asymmetric pause this bit indicates the link partner phy asymmetric pause capability. 0: no asymmetric pause toward link partner 1: asymmetric pause toward link partner ro 0b 10 pause this bit indicates the link partner phy symmetric pause capability. 0: no symmetric pause toward link partner 1: symmetric pause toward link partner ro 0b 9 100base-t4 this bit indicates the link partner phy 100base-t4 capability. 0: 100base-t4 ability not supported 1: 100base-t4 ability supported ro 0b 8 100base-x full duplex this bit indicates the link partner phy 100base-x full duplex capability. 0: 100base-x full duplex ability not supported 1: 100base-x full duplex ability supported ro 0b 7 100base-x half duplex this bit indicates the link partner phy 100base-x half duplex capability. 0: 100base-x half duplex ability not supported 1: 100base-x half duplex ability supported ro 0b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 206 smsc lan9303/lan9303i datasheet note 13.62 the port 1 & 2 phys support only ieee 802.3. 6 10base-t full duplex this bit indicates the link partner phy 10base-t full duplex capability. 0: 10base-t full duplex ability not supported 1: 10base-t full duplex ability supported ro 0b 5 10base-t half duplex this bit indicates the link partner phy 10base-t half duplex capability. 0: 10base-t half duplex ability not supported 1: 10base-t half duplex ability supported ro 0b 4:0 selector field this field identifies the type of message being sent by auto-negotiation. 00001: ieee 802.3 ro 00001b note 13.62 bits description type default downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 207 revision 1.5 (07-08-11) datasheet 13.3.2.7 port x phy auto-negotiation expansion register (phy_an_exp_x) this read/write register is used in the auto-negot iation process between the link partner and the port x phy. index (decimal): 6 size: 16 bits bits description type default 15:5 reserved ro - 4 parallel detection fault this bit indicates whether a parallel detection fault has been detected. 0: a fault hasnt been detected via the parallel detection function 1: a fault has been detected vi a the parallel detection function ro/lh 0b 3 link partner next page able this bit indicates whether the link partner has next page ability. 0: link partner does not contain next page capability 1: link partner contains next page capability ro 0b 2 local device next page able this bit indicates whether the local device has next page ability. 0: local device does not contain next page capability 1: local device contains next page capability ro 0b 1 page received this bit indicates the reception of a new page. 0: a new page has not been received 1: a new page has been received ro/lh 0b 0 link partner auto -negotiation able this bit indicates the auto-negotiation ability of the link partner. 0: link partner is not auto-negotiation able 1: link partner is auto-negotiation able ro 0b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 208 smsc lan9303/lan9303i datasheet 13.3.2.8 port x phy mode control/status register (phy_mode_control_status_x) this read/write register is used to control and monitor various port x phy configuration options. index (decimal): 17 size: 16 bits bits description type default 15:14 reserved ro - 13 energy detect power-down (edpwrdown) this bit controls the energy detect power-down mode. 0: energy detect power-down is disabled 1: energy detect power-down is enabled r/w 0b 12:2 reserved ro - 1 energy on (energyon) this bit indicates whether energy is detected on the line. it is cleared if no valid energy is detected within 256ms. this bit is unaffected by a software reset and is reset to 1 by a hardware reset. 0: no valid energy detected on the line 1: energy detected on the line ro 1b 0 reserved r/w 0b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 209 revision 1.5 (07-08-11) datasheet 13.3.2.9 port x phy special mode s register (phy_special_modes_x) this read/write register is used to cont rol the special modes of the port x phy. note: this register is re-written by the eeprom loader following the release of reset or a reload command. refer to section 8.4, "eeprom loader," on page 115 for more information. note 13.63 register bits designated as nasr are reset when the port x phy reset is generated via the reset control register (reset_ctl) . the nasr designation is only applicable when the reset (phy_rst) bit of the port x phy basic control register (phy_basic_control_x) is set. note 13.64 the default value of this field is determined by a combination of the configuration straps autoneg_strap_x, speed_strap_x, and duplex_strap_x. if the autoneg_strap_x is 1, then the default mode[2:0] value is 111b. else, the default value of this field is determined by the remaining straps. mode[2]=0, mode[1]=( speed_strap_1 for port 1 phy, speed_strap_2 for port 2 phy), and mode[0]=( duplex_strap_1 for port 1 phy, duplex_strap_2 for port 2 phy). configuration strap values are latched upon the de- assertion of a chip-level reset as described in section 4.2.4, "configuration straps," on page 46 . refer to section 4.2.4, "configuration straps," on page 46 for strap definitions. note 13.65 the default value of this field is determined by the phy_addr_sel_strap configuration strap. refer to section 7.1.1, "phy addressing," on page 90 for additional information. index (decimal): 18 size: 16 bits bits description type default 15:8 reserved ro - 7:5 phy mode (mode[2:0]) this field reflects the default phy mode of operation. refer to table 13.11 for a definition of each mode. r/w nasr note 13.63 note 13.64 4:0 phy address (phyadd) the phy address field determines the mmi address to which the phy will respond and is also used for initialization of the cipher (scrambler) key. each phy must have a unique address. refer to section 7.1.1, "phy addressing," on page 90 for additional information. note: no check is performed to ensure this address is unique from the other phy addresses (port 1 phy, port 2 phy, and virtual phy). r/w nasr note 13.63 note 13.65 table 13.11 mode [2:0] definitions mode[2:0] mode definitions 000 10base-t half duplex. auto-negotiat ion disabled. 001 10base-t full duplex. au to-negotiati on disabled. 010 100base-tx half d uplex. auto-negotiation disa bled. crs is active during transmit & receive. 011 100base-tx full duplex. au to-negotiation disabled. crs is active during receive. 100 reserved 101 reserved 110 power down mode. 111 all capable. auto-negotiation enabled. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 210 smsc lan9303/lan9303i datasheet 13.3.2.10 port x phy special control/status in dication register (phy_ special_control_stat_ind_x) this read/write register is used to control various options of the port x phy. index (decimal): 27 size: 16 bits bits description type default 15 auto-mdix contro l (amdixctrl) this bit is responsible for determining the source of auto-mdix control for port x. when set, the manual mdix and auto mdix straps ( manual_mdix_strap_1 / auto_mdix_strap_1 for port 1 phy, manual_mdix_strap_2 / auto_mdix_strap_2 for port 2 phy) are overridden, and auto-mdix functions are controlled using the amdixen and amdixstate bits of this register. when cleared, auto-mdix functionality is controlled by the manual mdix and auto mdix straps by default. refer to section 4.2.4, "configuration straps," on page 46 for configuration strap definitions. 0: port x auto-mdix determined by strap inputs ( table 13.13 ) 1: port x auto-mdix determined by bits amdixen and amdixstate bits note: the values of auto_mdix_strap_1 and auto_mdix_strap_2 are indicated in the amdix_en strap state port 1 and the amdix_en strap state port 2 bits of the hardware configuration register (hw_cfg) . r/w nasr note 13.66 0b 14 auto-mdix enable (amdixen) when the amdixctrl bit of this register is set, this bit is used in conjunction with the amdixstate bit to control the port x auto-mdix functionality as shown in table 13.12 . r/w nasr note 13.66 0b 13 auto-mdix state (amdixstate) when the amdixctrl bit of this register is set, this bit is used in conjunction with the amdixen bit to control the port x auto-mdix functionality as shown in table 13.12 . r/w nasr note 13.66 0b 12 reserved ro - 11 sqe test disable (sqeoff) this bit controls the disabling of the sqe test (heartbeat). sqe test is enabled by default. 0: sqe test enabled 1: sqe test disabled r/w nasr note 13.66 0b 10 receive pll lock control (vcooff_lp) this bit controls the locking of the receive pll. setting this bit to 1 forces the receive pll 10m to lock on the reference clock at all times. when in this mode, 10m data packets cannot be received. 0: receive pll 10m can lock on reference or line as needed (normal operation) 1: receive pll 10m locked onto reference clock at all times r/w nasr note 13.66 0b 9:5 reserved ro - 4 10base-t polarity state (xpol) this bit shows the polarity state of the 10base-t. 0: normal polarity 1: reversed polarity ro 0b 3:0 reserved ro - downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 211 revision 1.5 (07-08-11) datasheet note 13.66 register bits designated as nasr are reset when the port x phy reset is generated via the reset control register (reset_ctl) . the nasr designation is only applicable when the reset (phy_rst) bit of the port x phy basic control register (phy_basic_control_x) is set. table 13.12 auto-mdix enable and auto-mdix state bit functionality auto-mdix enable auto-mdix state mode 0 0 manual mode, no crossover 0 1 manual mode, crossover 10 a u t o - m d i x m o d e 1 1 reserved (do not use this state) table 13.13 mdix strap functionality auto_mdix_strap_x manual_mdix_strap_x mode 0 0 manual mode, no crossover 0 1 manual mode, crossover 1x a u t o - m d i x m o d e downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 212 smsc lan9303/lan9303i datasheet 13.3.2.11 port x phy interrupt source flags register (phy_interrupt_source_x) this read-only register is used to determine to source of various port x phy interrupts. all interrupt source bits in this register are read-only and latch high upon detection of the corresponding interrupt (if enabled). a read of this register clears the interrupts. these interrupts are enabled or masked via the port x phy interrupt mask register (phy_interrupt_mask_x) . index (decimal): 29 size: 16 bits bits description type default 15:8 reserved ro - 7 int7 this interrupt source bit indicates when the energy on (energyon) bit of the port x phy mode control/status register (phy_mode_control_status_x) has been set. 0: not source of interrupt 1: energyon generated ro/lh 0b 6 int6 this interrupt source bit indicates auto-negotiation is complete. 0: not source of interrupt 1: auto-negotiation complete ro/lh 0b 5 int5 this interrupt source bit indicates a remote fault has been detected. 0: not source of interrupt 1: remote fault detected ro/lh 0b 4 int4 this interrupt source bit indicates a link down (link status negated). 0: not source of interrupt 1: link down (link status negated) ro/lh 0b 3 int3 this interrupt source bit indicates an auto-negotiation lp acknowledge. 0: not source of interrupt 1: auto-negotiation lp acknowledge ro/lh 0b 2 int2 this interrupt source bit indicates a parallel detection fault. 0: not source of interrupt 1: parallel detection fault ro/lh 0b 1 int1 this interrupt source bit indicates an auto-negotiation page received. 0: not source of interrupt 1: auto-negotiation page received ro/lh 0b 0 reserved ro - downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 213 revision 1.5 (07-08-11) datasheet 13.3.2.12 port x phy interrupt mask register (phy_interrupt_mask_x) this read/write register is used to enable or mask the various port x phy interrupts and is used in conjunction with the port x phy interrupt source flags register (phy_interrupt_source_x) . index (decimal): 30 size: 16 bits bits description type default 15:8 reserved ro - 7 int7_mask this interrupt mask bit enables /masks the energyon interrupt. 0: interrupt source is masked 1: interrupt source is enabled r/w 0b 6 int6_mask this interrupt mask bit enables/masks the auto-negotiation interrupt. 0: interrupt source is masked 1: interrupt source is enabled r/w 0b 5 int5_mask this interrupt mask bit enables/m asks the remote fault interrupt. 0: interrupt source is masked 1: interrupt source is enabled r/w 0b 4 int4_mask this interrupt mask bit enables/masks t he link down (link status negated) interrupt. 0: interrupt source is masked 1: interrupt source is enabled r/w 0b 3 int3_mask this interrupt mask bit enables/masks the auto-negotiation lp acknowledge interrupt. 0: interrupt source is masked 1: interrupt source is enabled r/w 0b 2 int2_mask this interrupt mask bit enables/masks t he parallel detectio n fault interrupt. 0: interrupt source is masked 1: interrupt source is enabled r/w 0b 1 int1_mask this interrupt mask bit enables/masks the auto-negotiation page received interrupt. 0: interrupt source is masked 1: interrupt source is enabled r/w 0b 0 reserved ro - downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 214 smsc lan9303/lan9303i datasheet 13.3.2.13 port x phy special control/status register (p hy_special_control_status_x) this read/write register is used to control and monitor various options of the port x phy. note 13.67 default value is 010b if any external mii mode is selected, else 000b. index (decimal): 31 size: 16 bits bits description type default 15:13 reserved ro - 12 autodone this bit indicates the status of the auto-negotiation on the port x phy. 0: auto-negotiation is not completed, is disabled, or is not active 1: auto-negotiati on is completed ro 0b 11:5 reserved - write as 00 00010b, ignore on read r/w 0000010b 4:2 speed indication this field indicates the current port x speed configuration. ro note 13.67 1:0 reserved r/w 0b state description 000 reserved 001 10base-t half-duplex 010 100base-tx half-duplex 011 reserved 100 reserved 101 10base-t full-duplex 110 100base-tx full-duplex 111 reserved downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 215 revision 1.5 (07-08-11) datasheet 13.4 switch fabric cont rol and status registers this section details the various switch control and status registers that reside within the switch fabric. the switch control and status registers allow configuration of each individual switch port, the switch engine, and buffer manager. switch fabric related interrupts and resets are also controll ed and monitored via the switch csrs. the switch csrs are not memory mapped. all switch csrs are accessed indirectly via the switch fabric csr interface command register (switch_csr_cmd) , switch fabric csr interface data register (switch_csr_data) , and switch fabric csr interface direct data registers (switch_csr_direct_data) in the system csr memory mapped address space. all accesses to the switch csrs must be performed through these registers. refer to section 13.2.4, "switch fabric" for additional information. note: the flow control settings of the switch ports are configured via the switch fabric registers: port 1 manual flow control register (manual_fc_1) , port 2 manual flow control register (manual_fc_2) , and port 0 manual flow control register (manual_fc_0) located in the system csr address space. table 13.14 lists the switch csrs and their corresponding addresses in order. the switch fabric registers can be categorized into the following sub-sections: ? section 13.4.1, "general switch csrs," on page 226 ? section 13.4.2, "switch port 0, port 1, and port 2 csrs," on page 230 ? section 13.4.3, "switch engine csrs," on page 274 ? section 13.4.4, "buffer manager csrs," on page 321 table 13.14 indirectly accessible sw itch control and status registers register # symbol register name general switch csrs 0000h sw_dev_id switch device id register, section 13.4.1.1 0001h sw_reset switch reset register, section 13.4.1.2 0002h-0003h reserved reserved for future use 0004h sw_imr switch global interrupt mask register, section 13.4.1.3 0005h sw_ipr switch global interrupt pending register, section 13.4.1.4 0006h-03ffh reserved reserved for future use switch port 0 csrs 0400h mac_ver_id_0 port 0 mac version id register, section 13.4.2.1 0401h mac_rx_cfg_0 port 0 mac receive configuration register, section 13.4.2.2 0402h-040fh reserved reserved for future use 0410h mac_rx_undsze_cnt_0 port 0 mac receive undersize count register, section 13.4.2.3 0411h mac_rx_64_cnt_0 port 0 mac receive 64 byte count register, section 13.4.2.4 0412h mac_rx_65_to_127_cnt_0 port 0 mac receive 65 to 127 byte count register, section 13.4.2.5 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 216 smsc lan9303/lan9303i datasheet 0413h mac_rx_128_to_255_cnt_0 port 0 mac receive 128 to 255 byte count register, section 13.4.2.6 0414h mac_rx_256_to_511_cnt_0 port 0 mac receive 256 to 511 byte count register, section 13.4.2.7 0415h mac_rx_512_to_1023_cnt_0 port 0 mac receive 512 to 1023 byte count register, section 13.4.2.8 0416h mac_rx_1024_to_max_cnt_0 port 0 mac receive 1024 to max byte count register, section 13.4.2.9 0417h mac_rx_ovrsze_cnt_0 port 0 mac receive oversize count register, section 13.4.2.10 0418h mac_rx_pktok_cnt_0 port 0 mac receive ok count register, section 13.4.2.11 0419h mac_rx_crcerr_cnt_0 port 0 mac receive crc error count register, section 13.4.2.12 041ah mac_rx_mulcst_cnt_0 port 0 mac receive multicast count register, section 13.4.2.13 041bh mac_rx_brdcst_cnt_0 port 0 mac receive broadcast count register, section 13.4.2.14 041ch mac_rx_pause_cnt_0 port 0 mac receive pause frame count register, section 13.4.2.15 041dh mac_rx_frag_cnt_0 port 0 mac receive fragment error count register, section 13.4.2.16 041eh mac_rx_jabb_cnt_0 port 0 mac rece ive jabber error count register, section 13.4.2.17 041fh mac_rx_align_cnt_0 port 0 mac receive alignment error count register, section 13.4.2.18 0420h mac_rx_pktlen_cnt_0 port 0 mac receive packet length count register, section 13.4.2.19 0421h mac_rx_goodpktlen_cnt_0 port 0 mac receive good packet length count register, section 13.4.2.20 0422h mac_rx_symbl_cnt_0 port 0 mac receive symbol error count register, section 13.4.2.21 0423h mac_rx_ctlfrm_cnt_0 port 0 mac receive control frame count register, section 13.4.2.22 0424h-043fh reserved reserved for future use 0440h mac_tx_cfg_0 port 0 mac transmit configuration register, section 13.4.2.23 0441h mac_tx_fc_settings_0 port 0 mac transmit flow control settings register, section 13.4.2.24 0442h-0450h reserved reserved for future use 0451h mac_tx_defer_cnt_0i port 0 mac transmit deferred count register, section 13.4.2.25 0452h mac_tx_pause_cnt_0 port 0 mac transmit pause count register, section 13.4.2.26 table 13.14 indirectly accessible switch control and status registers (continued) register # symbol register name downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 217 revision 1.5 (07-08-11) datasheet 0453h mac_tx_pktok_cnt_0 port 0 mac transmit ok count register, section 13.4.2.27 0454h mac_tx_64_cnt_0 port 0 mac transmit 64 byte count register, section 13.4.2.28 0455h mac_tx_65_to_127_cnt_0 port 0 mac transmit 65 to 127 byte count register, section 13.4.2.29 0456h mac_tx_128_to_255_cnt_0 port 0 mac transmit 128 to 255 byte count register, section 13.4.2.30 0457h mac_tx_256_to_511_cnt_0 port 0 mac transmit 256 to 511 byte count register, section 13.4.2.31 0458h mac_tx_512_to_1023_cnt_0 port 0 mac transmit 512 to 1023 byte count register, section 13.4.2.32 0459h mac_tx_1024_to_max_cnt_0 port 0 mac transmit 1024 to max byte count register, section 13.4.2.33 045ah mac_tx_undsze_cnt_0 port 0 mac transmit undersize count register, section 13.4.2.34 045bh reserved reserved for future use 045ch mac_tx_pktlen_cnt_0 port 0 mac transmit packet length count register, section 13.4.2.35 045dh mac_tx_brdcst_cnt_0 port 0 mac transmit broadcast count register, section 13.4.2.36 045eh mac_tx_mulcst_cnt_0 port 0 mac transmit multicast count register, section 13.4.2.37 045fh mac_tx_latecol_0 port 0 mac transmit late collision count register, section 13.4.2.38 0460h mac_tx_excol_cnt_0 port 0 mac transm it excessive collision count register, section 13.4.2.39 0461h mac_tx_snglecol_cnt_0 port 0 mac transmit singl e collision count register, section 13.4.2.40 0462h mac_tx_multicol_cnt_0 port 0 mac transmit multiple collision count register, section 13.4.2.41 0463h mac_tx_totalcol_cnt_0 port 0 mac transmit total collision count register, section 13.4.2.42 0464-047fh reserved reserved for future use 0480h mac_imr_0 port 0 mac interrupt mask register, section 13.4.2.43 0481h mac_ipr_0 port 0 mac interrupt pending register, section 13.4.2.44 0482h-07ffh reserved reserved for future use switch port 1 csrs 0800h mac_ver_id_1 port 1 mac version id register, section 13.4.2.1 0801h mac_rx_cfg_1 port 1 mac receive configuration register, section 13.4.2.2 0802h-080fh reserved reserved for future use table 13.14 indirectly accessible switch control and status registers (continued) register # symbol register name downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 218 smsc lan9303/lan9303i datasheet 0810h mac_rx_undsze_cnt_1 port 1 mac receive undersize count register, section 13.4.2.3 0811h mac_rx_64_cnt_1 port 1 mac receive 64 byte count register, section 13.4.2.4 0812h mac_rx_65_to_127_cnt_1 port 1 mac receive 65 to 127 byte count register, section 13.4.2.5 0813h mac_rx_128_to_255_cnt_1 port 1 mac receive 128 to 255 byte count register, section 13.4.2.6 0814h mac_rx_256_to_511_cnt_1 port 1 mac receive 256 to 511 byte count register, section 13.4.2.7 0815h mac_rx_512_to_1023_cnt_1 port 1 mac receive 512 to 1023 byte count register, section 13.4.2.8 0816h mac_rx_1024_to_max_cnt_1 port 1 mac receive 1024 to max byte count register, section 13.4.2.9 0817h mac_rx_ovrsze_cnt_1 port 1 mac receive oversize count register, section 13.4.2.10 0818h mac_rx_pktok_cnt_1 port 1 mac receive ok count register, section 13.4.2.11 0819h mac_rx_crcerr_cnt_1 port 1 mac receive crc error count register, section 13.4.2.12 081ah mac_rx_mulcst_cnt_1 port 1 mac receive multicast count register, section 13.4.2.13 081bh mac_rx_brdcst_cnt_1 port 1 mac receive broadcast count register, section 13.4.2.14 081ch mac_rx_pause_cnt_1 port 1 mac receive pause frame count register, section 13.4.2.15 081dh mac_rx_frag_cnt_1 port 1 mac receive fragment error count register, section 13.4.2.16 081eh mac_rx_jabb_cnt_1 port 1 mac rece ive jabber error count register, section 13.4.2.17 081fh mac_rx_align_cnt_1 port 1 mac receive alignment error count register, section 13.4.2.18 0820h mac_rx_pktlen_cnt_1 port 1 mac receive packet length count register, section 13.4.2.19 0821h mac_rx_goodpktlen_cnt_1 port 1 mac receive good packet length count register, section 13.4.2.20 0822h mac_rx_symbl_cnt_1 port 1 mac receive symbol error count register, section 13.4.2.21 0823h mac_rx_ctlfrm_cnt_1 port 1 mac receive control frame count register, section 13.4.2.22 0824h-083fh reserved reserved for future use 0840h mac_tx_cfg_1 port 1 mac transmit configuration register, section 13.4.2.23 0841h mac_tx_fc_settings_1 port 1 mac transmit flow control settings register, section 13.4.2.24 table 13.14 indirectly accessible switch control and status registers (continued) register # symbol register name downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 219 revision 1.5 (07-08-11) datasheet 0842h-0850h reserved reserved for future use 0851h mac_tx_defer_cnt_1 port 1 mac transmit deferred count register, section 13.4.2.25 0852h mac_tx_pause_cnt_1 port 1 mac transmit pause count register, section 13.4.2.26 0853h mac_tx_pktok_cnt_1 port 1 mac transmit ok count register, section 13.4.2.27 0854h mac_rx_64_cnt_1 port 1 mac transmit 64 byte count register, section 13.4.2.28 0855h mac_tx_65_to_127_cnt_1 port 1 mac transmit 65 to 127 byte count register, section 13.4.2.29 0856h mac_tx_128_to_255_cnt_1 port 1 mac transmit 128 to 255 byte count register, section 13.4.2.30 0857h mac_tx_256_to_511_cnt_1 port 1 mac transmit 256 to 511 byte count register, section 13.4.2.31 0858h mac_tx_512_to_1023_cnt_1 port 1 mac transmit 512 to 1023 byte count register, section 13.4.2.32 0859h mac_tx_1024_to_max_cnt_1 port 1 mac transmit 1024 to max byte count register, section 13.4.2.33 085ah mac_tx_undsze_cnt_1 port 1 mac tr ansmit undersize count register, section 13.4.2.34 085bh reserved reserved for future use 085ch mac_tx_pktlen_cnt_1 port 1 mac transmit packet length count register, section 13.4.2.35 085dh mac_tx_brdcst_cnt_1 port 1 mac transmit broadcast count register, section 13.4.2.36 085eh mac_tx_mulcst_cnt_1 port 1 mac transmit multicast count register, section 13.4.2.37 085fh mac_tx_latecol_1 port 1 mac transmit late collision count register, section 13.4.2.38 0860h mac_tx_excol_cnt_1 port 1 mac transm it excessive collision count register, section 13.4.2.39 0861h mac_tx_snglecol_cnt_1 port 1 mac transmit singl e collision count register, section 13.4.2.40 0862h mac_tx_multicol_cnt_1 port 1 mac transmit multiple collision count register, section 13.4.2.41 0863h mac_tx_totalcol_cnt_1 port 1 mac transmit total collision count register, section 13.4.2.42 0864-087fh reserved reserved for future use 0880h mac_imr_1 port 1 mac interrupt mask register, section 13.4.2.43 0881h mac_ipr_1 port 1 mac interrupt pending register, section 13.4.2.44 0882h-0bffh reserved reserved for future use switch port 2 csrs table 13.14 indirectly accessible switch control and status registers (continued) register # symbol register name downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 220 smsc lan9303/lan9303i datasheet 0c00h mac_ver_id_2 port 2 mac version id register, section 13.4.2.1 0c01h mac_rx_cfg_2 port 2 mac receive configuration register, section 13.4.2.2 0c02 h -0c0f h reserved reserved for future use 0c10h mac_rx_undsze_cnt_2 port 2 mac receive undersize count register, section 13.4.2.3 0c11h mac_rx_64_cnt_2 port 2 mac receive 64 byte count register, section 13.4.2.4 0c12h mac_rx_65_to_127_cnt_2 port 2 mac receive 65 to 127 byte count register, section 13.4.2.5 0c13h mac_rx_128_to_255_cnt_2 port 2 mac receive 128 to 255 byte count register, section 13.4.2.6 0c14h mac_rx_256_to_511_cnt_2 port 2 mac receive 256 to 511 byte count register, section 13.4.2.7 0c15h mac_rx_512_to_1023_cnt_2 port 2 mac receive 512 to 1023 byte count register, section 13.4.2.8 0c16h mac_rx_1024_to_max_cnt_2 port 2 mac receive 1024 to max byte count register, section 13.4.2.9 0c17h mac_rx_ovrsze_cnt_2 port 2 mac receive oversize count register, section 13.4.2.10 0c18h mac_rx_pktok_cnt_2 port 2 mac receive ok count register, section 13.4.2.11 0c19h mac_rx_crcerr_cnt_2 port 2 mac receive crc error count register, section 13.4.2.12 0c1ah mac_rx_mulcst_cnt_2 port 2 mac receive multicast count register, section 13.4.2.13 0c1bh mac_rx_brdcst_cnt_2 port 2 mac receive broadcast count register, section 13.4.2.14 0c1ch mac_rx_pause_cnt_2 port 2 mac receive pause frame count register, section 13.4.2.15 0c1dh mac_rx_frag_cnt_2 port 2 mac receive fragment error count register, section 13.4.2.16 0c1eh mac_rx_jabb_cnt_2 port 2 mac rece ive jabber error count register, section 13.4.2.17 0c1fh mac_rx_align_cnt_2 port 2 mac receive alignment error count register, section 13.4.2.18 0c20h mac_rx_pktlen_cnt_2 port 2 mac receive packet length count register, section 13.4.2.19 0c21h mac_rx_goodpktlen_cnt_2 port 2 mac receive good packet length count register, section 13.4.2.20 0c22h mac_rx_symbl_cnt_2 port 2 mac receive symbol error count register, section 13.4.2.21 0c23h mac_rx_ctlfrm_cnt_2 port 2 mac receive control frame count register, section 13.4.2.22 table 13.14 indirectly accessible switch control and status registers (continued) register # symbol register name downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 221 revision 1.5 (07-08-11) datasheet 0c24 h -0c3f h reserved reserved for future use 0c40h mac_tx_cfg_2 port 2 mac transmit configuration register, section 13.4.2.23 0c41h mac_tx_fc_settings_2 port 2 mac transmit flow control settings register, section 13.4.2.24 0c42h-0c50h reserved reserved for future use 0c51h mac_tx_defer_cnt_2 port 2 mac transmit deferred count register, section 13.4.2.25 0c52h mac_tx_pause_cnt_2 port 2 mac transmit pause count register, section 13.4.2.26 0c53h mac_tx_pktok_cnt_2 port 2 mac transmit ok count register, section 13.4.2.27 0c54h mac_rx_64_cnt_2 port 2 mac transmit 64 byte count register, section 13.4.2.28 0c55h mac_tx_65_to_127_cnt_2 port 2 mac transmit 65 to 127 byte count register, section 13.4.2.29 0c56h mac_tx_128_to_255_cnt_2 port 2 mac transmit 128 to 255 byte count register, section 13.4.2.30 0c57h mac_tx_256_to_511_cnt_2 port 2 mac transmit 256 to 511 byte count register, section 13.4.2.31 0c58h mac_tx_512_to_1023_cnt_2 port 2 mac transmit 512 to 1023 byte count register, section 13.4.2.32 0c59h mac_tx_1024_to_max_cnt_2 port 2 mac transmit 1024 to max byte count register, section 13.4.2.33 0c5ah mac_tx_undsze_cnt_2 port 2 mac tr ansmit undersize count register, section 13.4.2.34 0c5bh reserved reserved for future use 0c5ch mac_tx_pktlen_cnt_2 port 2 mac transmit packet length count register, section 13.4.2.35 0c5dh mac_tx_brdcst_cnt_2 port 2 mac transmit broadcast count register, section 13.4.2.36 0c5eh mac_tx_mulcst_cnt_2 port 2 mac transmit multicast count register, section 13.4.2.37 0c5fh mac_tx_latecol_2 port 2 mac transmit late collision count register, section 13.4.2.38 0c60h mac_tx_excol_cnt_2 port 2 mac transm it excessive collision count register, section 13.4.2.39 0c61h mac_tx_snglecol_cnt_2 port 2 mac transmit singl e collision count register, section 13.4.2.40 0c62h mac_tx_multicol_cnt_2 port 2 mac transmit multiple collision count register, section 13.4.2.41 0c63h mac_tx_totalcol_cnt_2 port 2 mac transmit total collision count register, section 13.4.2.42 0c64-0c7fh reserved reserved for future use table 13.14 indirectly accessible switch control and status registers (continued) register # symbol register name downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 222 smsc lan9303/lan9303i datasheet 0c80h mac_imr_2 port 2 mac interrupt mask register, section 13.4.2.43 0c81h mac_ipr_2 port 2 mac interrupt pending register, section 13.4.2.44 0c82 h -17ff h reserved reserved for future use switch engine csrs 1800h swe_alr_cmd switch engine alr command register, section 13.4.3.1 1801h swe_alr_wr_dat_0 switch engine alr write data 0 register, section 13.4.3.2 1802h swe_alr_wr_dat_1 switch engine alr write data 1 register, section 13.4.3.3 1803h-1804h reserved reserved for future use 1805h swe_alr_rd_dat_0 switch engine alr read data 0 register, section 13.4.3.4 1806h swe_alr_rd_dat_1 switch engine alr read data 1 register, section 13.4.3.5 1807h reserved reserved for future use 1808h swe_alr_cmd_sts switch engine alr command status register, section 13.4.3.6 1809h swe_alr_cfg switch engine alr configuration register, section 13.4.3.7 180ah reserved reserved for future use 180bh swe_vlan_cmd switch engine vlan command register, section 13.4.3.8 180ch swe_vlan_wr_data switch engine vlan write data register, section 13.4.3.9 180dh reserved reserved for future use 180eh swe_vlan_rd_data switch engine vlan read data register, section 13.4.3.10 180fh reserved reserved for future use 1810h swe_vlan_cmd_sts switch engine vlan command status register, section 13.4.3.11 1811h swe_diffserv_tbl_cmd switch engine difserv table command register, section 13.4.3.12 1812h swe_diffserv_tbl_wr_data switch engine diffserv table write data register, section 13.4.3.13 1813h swe_diffserv_tbl_rd_data switch engine diffserv table read data register, section 13.4.3.14 1814h swe_diffserv_tbl_cmd_sts switch engine diffserv table command status register, section 13.4.3.15 1815h-183fh reserved reserved for future use 1840h swe_glb_ingress_cfg switch engine global ingress configuration register, section 13.4.3.16 1841h swe_port_ingress_cfg switch engine port ingress configuration register, section 13.4.3.17 1842h swe_admt_only_vlan switch engi ne admit only vlan register, section 13.4.3.18 table 13.14 indirectly accessible switch control and status registers (continued) register # symbol register name downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 223 revision 1.5 (07-08-11) datasheet 1843h swe_port_state switch engine port state register, section 13.4.3.19 1844h reserved reserved for future use 1845h swe_pri_to_que switch engine priority to queue register, section 13.4.3.20 1846h swe_port_mirror switch engine port mirroring register, section 13.4.3.21 1847h swe_ingress_port_typ switch engine ingress port type register, section 13.4.3.22 1848h swe_bcst_throt switch engine broadcast throttling register, section 13.4.3.23 1849h swe_admt_n_member switch engine admit non member register, section 13.4.3.24 184ah swe_ingress_rate_cfg switch engine ingress rate configuration register, section 13.4.3.25 184bh swe_ingress_rate_cmd switch engine ingress rate command register, section 13.4.3.26 184ch swe_ingress_rate_cmd_sts switch engine ingress rate command status register, section 13.4.3.27 184dh swe_ingress_rate_wr_data switch engine ingress rate write data register, section 13.4.3.28 184eh swe_ingress_rate_rd_data switch engine ingress rate read data register, section 13.4.3.29 184fh reserved reserved for future use 1850h swe_filtered_cnt_0 switch engine port 0 ingress filtered count register, section 13.4.3.30 1851h swe_filtered_cnt_1 switch engine port 1 ingress filtered count register, section 13.4.3.31 1852h swe_filtered_cnt_2 switch engine port 2 ingress filtered count register, section 13.4.3.32 1853h-1854h reserved reserved for future use 1855h swe_ingress_regen_tbl_0 switch engine port 0 ingress vlan priority regeneration register, section 13.4.3.33 1856h swe_ingress_regen_tbl_1 switch engine port 1 ingress vlan priority regeneration register, section 13.4.3.34 1857h swe_ingress_regen_tbl_2 switch engine port 2 ingress vlan priority regeneration register, section 13.4.3.35 1858h swe_lrn_discrd_cnt_0 switch engine port 0 learn discard count register, section 13.4.3.36 1859h swe_lrn_discrd_cnt_1 switch engine port 1 learn discard count register, section 13.4.3.37 185ah swe_lrn_discrd_cnt_2 switch engine port 2 learn discard count register, section 13.4.3.38 185bh-187fh reserved reserved for future use 1880h swe_imr switch engine interrupt mask register, section 13.4.3.39 table 13.14 indirectly accessible switch control and status registers (continued) register # symbol register name downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 224 smsc lan9303/lan9303i datasheet 1881h swe_ipr switch engine interrupt pending register, section 13.4.3.40 1882h-1bffh reserved reserved for future use buffer manager (bm) csrs 1c00h bm_cfg buffer manager configuration register, section 13.4.4.1 1c01h bm_drop_lvl buffer manager drop level register, section 13.4.4.2 1c02h bm_fc_pause_lvl buffer manager flow control pause level register, section 13.4.4.3 1c03h bm_fc_resume_lvl buffer manager flow control resume level register, section 13.4.4.4 1c04h bm_bcst_lvl buffer manager broadcast buffer level register, section 13.4.4.5 1c05h bm_drp_cnt_src_0 buffer manager port 0 drop count register, section 13.4.4.6 1c06h bm_drp_cnt_src_1 buffer manager port 1 drop count register, section 13.4.4.7 1c07h bm_drp_cnt_src_2 buffer manager port 2 drop count register, section 13.4.4.8 1c08h bm_rst_sts buffer manager reset status register, section 13.4.4.9 1c09h bm_rndm_dscrd_tbl_cmd buffer manager random discard table command register, section 13.4.4.10 1c0ah bm_rndm_dscrd_tbl_wdata buffer manager random discard table write data register, section 13.4.4.11 1c0bh bm_rndm_dscrd_tbl_rdata buffer manager random discard table read data register, section 13.4.4.12 1c0ch bm_egrss_port_type buffer man ager egress port type register, section 13.4.4.13 1c0dh bm_egrss_rate_00_01 buffer manager port 0 egress rate priority queue 0/1 register, section 13.4.4.14 1c0eh bm_egrss_rate_02_03 buffer manager port 0 egress rate priority queue 2/3 register, section 13.4.4.15 1c0fh bm_egrss_rate_10_11 buffer manager port 1 egress rate priority queue 0/1 register, section 13.4.4.16 1c10h bm_egrss_rate_12_13 buffer manager port 1 egress rate priority queue 2/3 register, section 13.4.4.17 1c11h bm_egrss_rate_20_21 buffer manager port 2 egress rate priority queue 0/1 register, section 13.4.4.18 1c12h bm_egrss_rate_22_23 buffer manager port 2 egress rate priority queue 2/3 register, section 13.4.4.19 1c13h bm_vlan_0 buffer manager port 0 default vlan id and priority register, section 13.4.4.20 1c14h bm_vlan_1 buffer manager port 1 default vlan id and priority register, section 13.4.4.21 1c15h bm_vlan_2 buffer manager port 2 default vlan id and priority register, section 13.4.4.22 table 13.14 indirectly accessible switch control and status registers (continued) register # symbol register name downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 225 revision 1.5 (07-08-11) datasheet 1c16h bm_rate_drp_cnt_src_0 buffer manager port 0 ingress rate drop count register, section 13.4.4.23 1c17h bm_rate_drp_cnt_src_1 buffer manager port 1 ingress rate drop count register, section 13.4.4.24 1c18h bm_rate_drp_cnt_src_2 buffer manager port 2 ingress rate drop count register, section 13.4.4.25 1c19 h -1c1f h reserved reserved for future use 1c20h bm_imr buffer manager interrupt mask register, section 13.4.4.26 1c21h bm_ipr buffer manager interrupt pending register, section 13.4.4.27 1c22 h -ffff h reserved reserved for future use table 13.14 indirectly accessible switch control and status registers (continued) register # symbol register name downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 226 smsc lan9303/lan9303i datasheet 13.4.1 general switch csrs this section details the general switch fabric csrs. these registers control the main reset and interrupt functions of the switch fabric. a list of the general switch csrs and their corresponding register numbers is included in table 13.14 . 13.4.1.1 switch device id register (sw_dev_id) this read-only register contains switch device id information, including the device type, chip version and revision codes. register #: 0000h size: 32 bits bits description type default 31:24 reserved ro - 23:16 device type code (device_type) ro 03h 15:8 chip version code (chip_version) ro 04h 7:0 revision code (revision) ro 07h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 227 revision 1.5 (07-08-11) datasheet 13.4.1.2 switch reset register (sw_reset) this register contains the switch fabric global reset. refer to section 4.2, "resets," on page 42 for more information. register #: 0001h size: 32 bits bits description type default 31:1 reserved ro - 0 switch fabric reset (sw_reset) this bit is the global switch fabric reset. all switch fabric blocks are affected. this bit must be manually cleared. wo 0b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 228 smsc lan9303/lan9303i datasheet 13.4.1.3 switch global interrupt mask register (sw_imr) this read/write register contains the global interr upt mask for the switch fabric interrupts. all switch related interrupts in the switch global interrupt pending register (sw_ipr) may be masked via this register. an interrupt is masked by setting the co rresponding bit of this register. clearing a bit will unmask the interrupt. when an unmasked switch fabric interrupt is generated in the switch global interrupt pending register (sw_ipr) , the interrupt will trigger the switch fabric interrupt event (switch_int) bit in the interrupt status register (int_sts) . refer to chapter 5, "system interrupts," on page 55 for more information. register #: 0004h size: 32 bits bits description type default 31:9 reserved ro - 8:7 reserved note: these bits must be written as 11b r/w 11b 6 buffer manager interrupt mask (bm) when set, prevents the generation of switch fabric interrupts due to the buffer manager via the buffer manager interrupt pending register (bm_ipr) . the status bits in the switch global interrupt pending register (sw_ipr) register are not affected. r/w 1b 5 switch engine interrupt mask (swe) when set, prevents the generation of switch fabric interrupts due to the switch engine via the switch engine interrupt pending register (swe_ipr) . the status bits in the switch global interrupt pending register (sw_ipr) register are not affected. r/w 1b 4:3 reserved note: these bits must be written as 11b r/w 11b 2 port 2 mac interrupt mask (mac_2) when set, prevents the generation of switch fabric interrupts due to the port 2 mac via the mac_ipr_2 register (see section 13.4.2.44, on page 273 ). the status bits in the switch global interrupt pending register (sw_ipr) register are not affected. r/w 1b 1 port 1 mac interrupt mask (mac_1) when set, prevents the generation of switch fabric interrupts due to the port 1 mac via the mac_ipr_1 register (see section 13.4.2.44, on page 273 ). the status bits in the switch global interrupt pending register (sw_ipr) register are not affected. r/w 1b 0 port 0 mac interrupt mask (mac_0) when set, prevents the generation of switch fabric interrupts due to the port 0 mac via the mac_ipr_0 register (see section 13.4.2.44, on page 273 ). the status bits in the switch global interrupt pending register (sw_ipr) register are not affected. r/w 1b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 229 revision 1.5 (07-08-11) datasheet 13.4.1.4 switch global interrupt pending register (sw_ipr) this read-only register contains the pending global interrupts for the switch fabric. a set bit indicates an unmasked bit in the corresponding switch fabric sub-system has been triggered. all switch related interrupts in this regist er may be masked via the switch global interrupt mask register (sw_imr) register. when an unmasked switch fabric interrupt is generated in this regi ster, the interrupt will trigger the switch fabric interru pt event (switch_int) bit in the interrupt status register (int_sts) . refer to chapter 5, "system interrupts," on page 55 for more information. register #: 0005h size: 32 bits bits description type default 31:7 reserved ro - 6 buffer manager interrupt (bm) set when any unmasked bit in the buffer manager interrupt pending register (bm_ipr) is triggered. this bit is cleared upon a read. rc 0b 5 switch engine interrupt (swe) set when any unmasked bit in the switch engine interrupt pending register (swe_ipr) is triggered. this bit is cleared upon a read. rc 0b 4:3 reserved ro - 2 port 2 mac interrupt (mac_2) set when any unmasked bit in the mac_ipr_2 register (see section 13.4.2.44, on page 273 ) is triggered. this bit is cleared upon a read. rc 0b 1 port 1 mac interrupt (mac_1) set when any unmasked bit in the mac_ipr_1 register (see section 13.4.2.44, on page 273 ) is triggered. this bit is cleared upon a read. rc 0b 0 port 0 mac interrupt (mac_0) set when any unmasked bit in the mac_ipr_0 register (see section 13.4.2.44, on page 273 ) is triggered. this bit is cleared upon a read. rc 0b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 230 smsc lan9303/lan9303i datasheet 13.4.2 switch port 0, port 1, and port 2 csrs this section details the switch port 0, port 1, and port 2 csrs. each port provides a functionally identical set of registers which allow for the configuration of port settings, interrupts, and the monitoring of the various packet counters. because the port 0, port 1, and port 2 csrs are functionally identical, their register descriptions have been consolidated. a lowercase x has been appended to the end of each switch port register name in this section, where x should be replaced with 0, 1, or 2 for the port 0, port 1, or port 2 registers respectively. a list of the switch port 0, port 1, and port 2 registers and their corresponding register numbers is included in table 13.14 . 13.4.2.1 port x mac version id register (mac_ver_id_x) this read-only register contains switch device id information, including the device type, chip version and revision codes. register #: port0: 0400h size: 32 bits port1: 0800h port2: 0c00h bits description type default 31:12 reserved ro - 11:8 device type code (device_type) ro 5h 7:4 chip version code (chip_version) ro 8h 3:0 revision code (revision) ro 3h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 231 revision 1.5 (07-08-11) datasheet 13.4.2.2 port x mac receive configuration register (mac_rx_cfg_x) this read/write register configures the packet type passing parameters of the port. register #: port0: 0401h size: 32 bits port1: 0801h port2: 0c01h bits description type default 31:8 reserved ro - 7 reserved note: this bit must always be written as 0. r/w 0b 6 reserved ro - 5 enable receive own transmit when set, the switch port will receive its own transmission if it is looped back from the phy. normally, this function is only used in half duplex phy loopback. r/w 0b 4 reserved ro - 3 jumbo2k when set, the maximum packet size accepted is 2048 bytes. statistics boundaries are also adjusted. r/w 0b 2 reserved ro - 1 reject mac types when set, mac control frames (packets with a type field of 8808h) are filtered. when cleared, mac control frames, other than mac control pause frames, are sent to the forwarding process. mac control pause frames are always consumed by the switch. r/w 1b 0 rx enable when set, the receive port is enabled. when cleared, the receive port is disabled. r/w 1b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 232 smsc lan9303/lan9303i datasheet 13.4.2.3 port x mac receive undersize count register (mac_rx_undsze_cnt_x) this register provides a counter of undersized pack ets received by the port. the counter is cleared upon being read. register #: port0: 0410h size: 32 bits port1: 0810h port2: 0c10h bits description type default 31:0 rx undersize count of packets that have less than 64 byte and a valid fcs. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 115 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 233 revision 1.5 (07-08-11) datasheet 13.4.2.4 port x mac receive 64 byte count register (mac_rx_64_cnt_x) this register provides a counter of 64 byte packets received by the port. the counter is cleared upon being read. note: a bad packet is defined as a packet that has an fcs or symbol error. for this counter, a packet that is not an integral number of bytes is rounded down to the nearest byte. register #: port0: 0411h size: 32 bits port1: 0811h port2: 0c11h bits description type default 31:0 rx 64 bytes count of packets (including bad packets) that have exactly 64 bytes. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 234 smsc lan9303/lan9303i datasheet 13.4.2.5 port x mac receive 65 to 127 byte count register (mac_rx_65_to_127_cnt_x) this register provides a counter of received packets between the size of 65 to 127 bytes. the counter is cleared upon being read. note: a bad packet is defined as a packet that has an fcs or symbol error. for this counter, a packet that is not an integral number of bytes is rounded down to the nearest byte. register #: port0: 0412h size: 32 bits port1: 0812h port2: 0c12h bits description type default 31:0 rx 65 to 127 bytes count of packets (including bad packets) that have between 65 and 127 bytes. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 487 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 235 revision 1.5 (07-08-11) datasheet 13.4.2.6 port x mac receive 128 to 255 byte count register (mac_rx_128_to_255_cnt_x) this register provides a counter of received packets between the size of 128 to 255 bytes. the counter is cleared upon being read. note: a bad packet is defined as a packet that has an fcs or symbol error. for this counter, a packet that is not an integral number of bytes is rounded down to the nearest byte. register #: port0: 0413h size: 32 bits port1: 0813h port2: 0c13h bits description type default 31:0 rx 128 to 255 bytes count of packets (including bad packets) that have between 128 and 255 bytes. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 848 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 236 smsc lan9303/lan9303i datasheet 13.4.2.7 port x mac receive 256 to 511 byte count register (mac_rx_256_to_511_cnt_x) this register provides a counter of received packets between the size of 256 to 511 bytes. the counter is cleared upon being read. note: a bad packet is defined as a packet that has an fcs or symbol error. for this counter, a packet that is not an integral number of bytes is rounded down to the nearest byte. register #: port0: 0414h size: 32 bits port1: 0814h port2: 0c14h bits description type default 31:0 rx 256 to 511 bytes count of packets (including bad packets) that have between 256 and 511 bytes. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 1581 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 237 revision 1.5 (07-08-11) datasheet 13.4.2.8 port x mac receive 512 to 1023 byte count register (mac_rx_512_to_1023_cnt_x) this register provides a counter of received packets between the size of 512 to 1023 bytes. the counter is cleared upon being read. note: a bad packet is defined as a packet that has an fcs or symbol error. for this counter, a packet that is not an integral number of bytes is rounded down to the nearest byte. register #: port0: 0415h size: 32 bits port1: 0815h port2: 0c15h bits description type default 31:0 rx 512 to 1023 bytes count of packets (including bad packets) that have between 512 and 1023 bytes. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 3047 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 238 smsc lan9303/lan9303i datasheet 13.4.2.9 port x mac receive 1024 to max byte count register (mac_rx_1024_to_max_cnt_x) this register provides a counter of received packets between the size of 1024 to the maximum allowable number bytes. the counter is cleared upon being read. note: a bad packet is defined as a packet that has an fcs or symbol error. for this counter, a packet with the maximum number of bytes that is not an integral number of bytes (e.g. a 1518 1/2 byte packet) is counted. register #: port0: 0416h size: 32 bits port1: 0816h port2: 0c16h bits description type default 31:0 rx 1024 to max bytes count of packets (including bad packets) that have between 1024 and the maximum allowable number of bytes. the max number of bytes is 1518 for untagged packets and 1522 for tagged packets. if the jumbo2k bit is set in the port x mac receive configuration register (mac_rx_cfg_x) , the max number of bytes is 2048. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 5979 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 239 revision 1.5 (07-08-11) datasheet 13.4.2.10 port x mac receive oversize count register (mac_rx_ovrsze_cnt_x) this register provides a counter of received packets with a size greater than the maximum byte size. the counter is cleared upon being read. note: for this counter, a packet with the maximum number of bytes that is not an integral number of bytes (e.g. a 1518 1/2 byte packet) is not considered oversize. register #: port0: 0417h size: 32 bits port1: 0817h port2: 0c17h bits description type default 31:0 rx oversize count of packets that have more than the maximum allowable number of bytes and a valid fcs. the max number of bytes is 1518 for untagged packets and 1522 for tagged packets. if the jumbo2k bit is set in the port x mac receive configuration register (mac_rx_cfg_x) , the max number of bytes is 2048. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 8813 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 240 smsc lan9303/lan9303i datasheet 13.4.2.11 port x mac receive ok co unt register (mac_rx_pktok_cnt_x) this register provides a counter of received packets that are or proper length and are free of errors. the counter is cleared upon being read. note: a bad packet is one that has a fcs or symbol error. register #: port0: 0418h size: 32 bits port1: 0818h port2: 0c18h bits description type default 31:0 rx ok count of packets that are of proper length and are free of errors. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 241 revision 1.5 (07-08-11) datasheet 13.4.2.12 port x mac receive crc error count register (mac_rx_crcerr_cnt_x) this register provides a counter of received packets that with crc errors. the counter is cleared upon being read. register #: port0: 0419h size: 32 bits port1: 0819h port2: 0c19h bits description type default 31:0 rx crc count of packets that have between 64 and the maximum allowable number of bytes and have a bad fcs, but do not have an extra nibble. the max number of bytes is 1518 for untagged packets and 1522 for tagged packets. if the jumbo2k bit is set in the port x mac receive configuration register (mac_rx_cfg_x) , the max number of bytes is 2048. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 137 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 242 smsc lan9303/lan9303i datasheet 13.4.2.13 port x mac receive multicast count register (m ac_rx_mulcst_cnt_x) this register provides a counter of valid received packets with a multicast destination address. the counter is cleared upon being read. note: a bad packet is one that has a fcs or symbol error. register #: port0: 041ah size: 32 bits port1: 081ah port2: 0c1ah bits description type default 31:0 rx multicast count of good packets (proper length and free of errors), including mac control frames, that have a multicast destination address (not including broadcasts). note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 243 revision 1.5 (07-08-11) datasheet 13.4.2.14 port x mac receive broadc ast count register (mac_rx_brdcst_cnt_x) this register provides a counter of valid received packets with a broadcast destination address. the counter is cleared upon being read. note: a bad packet is one that has a fcs or symbol error. register #: port0: 041bh size: 32 bits port1: 081bh port2: 0c1bh bits description type default 31:0 rx broadcast count of valid packets (proper length and free of errors) that have a broadcast destination address. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 244 smsc lan9303/lan9303i datasheet 13.4.2.15 port x mac receive pause fram e count register (mac_rx_pause_cnt_x) this register provides a counter of valid receiv ed pause frame packets. the counter is cleared upon being read. note: a bad packet is one that has a fcs or symbol error. register #: port0: 041ch size: 32 bits port1: 081ch port2: 0c1ch bits description type default 31:0 rx pause frame count of valid packets (proper length and free of errors) that have a type field of 8808h and an op-code of 0001(pause). note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 245 revision 1.5 (07-08-11) datasheet 13.4.2.16 port x mac receive fragment er ror count register (mac_rx_frag_cnt_x) this register provides a counter of received packets of less than 64 bytes and a fcs error. the counter is cleared upon being read. register #: port0: 041dh size: 32 bits port1: 081dh port2: 0c1dh bits description type default 31:0 rx fragment count of packets that have less than 64 bytes and a fcs error. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 115 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 246 smsc lan9303/lan9303i datasheet 13.4.2.17 port x mac receive jabber erro r count register (mac_rx_jabb_cnt_x) this register provides a counter of received packets with greater than the maximum allowable number of bytes and a fcs error. the counter is cleared upon being read. note: for this counter, a packet with the maximum number of bytes that is not an integral number of bytes (e.g. a 1518 1/2 byte packet) and contains a fcs error is not considered jabber and is not counted here. register #: port0: 041eh size: 32 bits port1: 081eh port2: 0c1eh bits description type default 31:0 rx jabber count of packets that have more than the maximum allowable number of bytes and a fcs error. the max number of bytes is 1518 for untagged packets and 1522 for tagged packets. if the jumbo2k bit is set in the port x mac receive configuration register (mac_rx_cfg_x) , the max number of bytes is 2048. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 8813 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 247 revision 1.5 (07-08-11) datasheet 13.4.2.18 port x mac receive alignment error count register (mac_rx_align_cnt_x) this register provides a counter of received packets with 64 bytes to the maximum allowable, and a fcs error. the counter is cleared upon being read. note: for this counter, a packet with the maximum number of bytes that is not an integral number of bytes (e.g. a 1518 1/2 byte packet) and a fcs error is considered an alignment error and is counted. register #: port0: 041fh size: 32 bits port1: 081fh port2: 0c1fh bits description type default 31:0 rx alignment count of packets that have between 64 bytes and the maximum allowable number of bytes and are not byte aligned and have a bad fcs. the max number of bytes is 1518 for untagged packets and 1522 for tagged packets. if the jumbo2k bit is set in the port x mac receive configuration register (mac_rx_cfg_x) , the max number of bytes is 2048. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 248 smsc lan9303/lan9303i datasheet 13.4.2.19 port x mac receive packet lengt h count register (mac_rx_pktlen_cnt_x) this register provides a counter of total bytes received. the counter is cleared upon being read. note: if necessary, for oversized packets, the packet is either truncated at 1518 bytes (untagged, jumbo2k=0), 1522 bytes (tagged, jumbo2k=0), or 2048 bytes (jumbo2k=1). if this occurs, the byte count recorded is 1518, 1522, or 2048, respectively. the jumbo2k bit is located in the port x mac receive configuration register (mac_rx_cfg_x) . note: a bad packet is one that has an fcs or symbol error. for this counter, a packet that is not an integral number of bytes (e.g. a 1518 1/2 byte packet) is rounded down to the nearest byte. register #: port0: 0420h size: 32 bits port1: 0820h port2: 0c20h bits description type default 31:0 rx bytes count of total bytes received (including bad packets). note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 5.8 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 249 revision 1.5 (07-08-11) datasheet 13.4.2.20 port x mac receive good packet length count register (mac_rx_goodpktlen_cnt_x) this register provides a counter of total bytes received in good packets. the counter is cleared upon being read. note: a bad packet is one that has an fcs or symbol error. register #: port0: 0421h size: 32 bits port1: 0821h port2: 0c21h bits description type default 31:0 rx good bytes count of total bytes received in good packets (proper length and free of errors). note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 5.8 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 250 smsc lan9303/lan9303i datasheet 13.4.2.21 port x mac receive symbol error count register (mac_rx_symbol_cnt_x) this register provides a counter of received packets with a symbol error. the counter is cleared upon being read. register #: port0: 0422h size: 32 bits port1: 0822h port2: 0c22h bits description type default 31:0 rx symbol count of packets that had a receive symbol error. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 115 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 251 revision 1.5 (07-08-11) datasheet 13.4.2.22 port x mac receive control frame count register (mac_rx_ctlfrm_cnt_x) this register provides a counter of good packets wi th a type field of 8808h. the counter is cleared upon being read. note: a bad packet is one that has an fcs or symbol error. register #: port0: 0423h size: 32 bits port1: 0823h port2: 0c23h bits description type default 31:0 rx control frame count of good packets (proper length and free of errors) that have a type field of 8808h. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 252 smsc lan9303/lan9303i datasheet 13.4.2.23 port x mac transmit configuration register (mac_tx_cfg_x) this read/write register configures th e transmit packet parameters of the port. register #: port0: 0440h size: 32 bits port1: 0840h port2: 0c40h bits description type default 31:8 reserved ro - 7 mac counter test when set, tx and rx counters that normally clear to 0 when read, will be set to 7fff_fffch when read with the exception of the port x mac receive packet length count register (mac_rx_pktlen_cnt_x) , port x mac transmit packet length count register (mac_tx_pktlen_cnt_x) , and port x mac receive good packet length count register (mac_rx_goodpktlen_cnt_x) counters which will be set to 7fff_ff80h. r/w 0b 6:2 ifg config these bits control the transmit inter-frame gap. ifg bit times = (ifg config *4) + 12 note: ifg config values less than 15 are unsupported. r/w 10101b 1 tx pad enable when set, packets shorter than 64 bytes are padded with zeros if needed and a fcs is appended. packets that are 60 bytes or less will become 64 bytes. packets that are 61, 62, and 63 bytes will become 65, 66, and 67 bytes respectively. r/w 1b 0 tx enable when set, the transmit port is enabled. when cleared, the transmit port is disabled. r/w 1b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 253 revision 1.5 (07-08-11) datasheet 13.4.2.24 port x mac transmit flow control settings register (mac_tx_fc_settings_x) this read/write register configures the flow control settings of the port. register #: port0: 0441h size: 32 bits port1: 0841h port2: 0c41h bits description type default 31:18 reserved ro - 17:16 backoff reset rx/tx half duplex-only. determines when the truncated binary exponential backoff attempts counter is reset. 00 = reset on successful transmission (ieee standard) 01 = reset on successful reception 1x = reset on either successful transmission or reception r/w 00b 15:0 pause time value the value that is inserted into the transmitted pause packet when the switch wants to xoff its link partner. r/w ffffh downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 254 smsc lan9303/lan9303i datasheet 13.4.2.25 port x mac transmit deferred count register (mac_tx_defer_cnt_x) this register provides a counter deferred packets. the counter is cleared upon being read. register #: port0: 0451h size: 32 bits port1: 0851h port2: 0c51h bits description type default 31:0 tx deferred count of packets that were available for transmission but were deferred on the first transmit attempt due to network traffic (either on receive or prior transmission). this counter is not in cremented on collisions. this counter is incremented only in half-duplex operation. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 255 revision 1.5 (07-08-11) datasheet 13.4.2.26 port x mac transmit pause count register (mac_tx_pause_cnt_x) this register provides a counter of transmitted pa use packets. the counter is cleared upon being read. register #: port0: 0452h size: 32 bits port1: 0852h port2: 0c52h bits description type default 31:0 tx pause count of pause packets transmitted. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 256 smsc lan9303/lan9303i datasheet 13.4.2.27 port x mac transmit ok count register (mac_tx_pktok_cnt_x) this register provides a counter of successful transmissions. the counter is cleared upon being read. register #: port0: 0453h size: 32 bits port1: 0853h port2: 0c53h bits description type default 31:0 tx ok count of successful transmissions. undersize packets are not included in this count. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 257 revision 1.5 (07-08-11) datasheet 13.4.2.28 port x mac transmit 64 byte count register (mac_tx_64_cnt_x) this register provides a counter of 64 byte packe ts transmitted by the port. the counter is cleared upon being read. register #: port0: 0454h size: 32 bits port1: 0854h port2: 0c54h bits description type default 31:0 tx 64 bytes count of packets that have exactly 64 bytes. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 258 smsc lan9303/lan9303i datasheet 13.4.2.29 port x mac transmit 65 to 127 by te count register (mac_tx_65_to_127_cnt_x) this register provides a counter of transmitted pa ckets between the size of 65 to 127 bytes. the counter is cleared upon being read. register #: port0: 0455h size: 32 bits port1: 0855h port2: 0c55h bits description type default 31:0 tx 65 to 127 bytes count of packets that have between 65 and 127 bytes. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 487 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 259 revision 1.5 (07-08-11) datasheet 13.4.2.30 port x mac transmit 128 to 255 byte count register (mac_tx_128_to_255_cnt_x) this register provides a counter of transmitted packets between the size of 128 to 255 bytes. the counter is cleared upon being read. register #: port0: 0456h size: 32 bits port1: 0856h port2: 0c56h bits description type default 31:0 tx 128 to 255 bytes count of packets that have between 128 and 255 bytes. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 848 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 260 smsc lan9303/lan9303i datasheet 13.4.2.31 port x mac transmit 256 to 511 byte count register (mac_tx_256_to_511_cnt_x) this register provides a counter of transmitted pa ckets between the size of 256 to 511 bytes. the counter is cleared upon being read. register #: port0: 0457h size: 32 bits port1: 0857h port2: 0c57h bits description type default 31:0 tx 256 to 511 bytes count of packets that have between 256 and 511 bytes. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 1581 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 261 revision 1.5 (07-08-11) datasheet 13.4.2.32 port x mac transmit 512 to 1023 byte count register (mac_tx_512_to_1023_cnt_x) this register provides a counter of transmitted packets between the size of 512 to 1023 bytes. the counter is cleared upon being read. register #: port0: 0458h size: 32 bits port1: 0858h port2: 0c58h bits description type default 31:0 tx 512 to 1023 bytes count of packets that have between 512 and 1023 bytes. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 3047 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 262 smsc lan9303/lan9303i datasheet 13.4.2.33 port x mac transmit 1024 to max by te count register (m ac_tx_1024_to_max_cnt_x) this register provides a counte r of transmitted packets between the size of 1024 to the maximum allowable number bytes. the counter is cleared upon being read. register #: port0: 0459h size: 32 bits port1: 0859h port2: 0c59h bits description type default 31:0 tx 1024 to max bytes count of packets that have more than 1024 bytes. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 5979 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 263 revision 1.5 (07-08-11) datasheet 13.4.2.34 port x mac transmit undersiz e count register (m ac_tx_undsze_cnt_x) this register provides a counter of undersized packe ts transmitted by the port. the counter is cleared upon being read. register #: port0: 045ah size: 32 bits port1: 085ah port2: 0c5ah bits description type default 31:0 tx undersize count of packets that have less than 64 bytes. note: this condition could occur when tx padding is disabled and a tag is removed. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 458 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 264 smsc lan9303/lan9303i datasheet 13.4.2.35 port x mac transmit packet length count register (mac_tx_pktlen_cnt_x) this register provides a counter of total bytes transmitted. the counter is cleared upon being read. register #: port0: 045ch size: 32 bits port1: 085ch port2: 0c5ch bits description type default 31:0 tx bytes count of total bytes transmitted (does not include bytes from collisions, but does include bytes from pause packets). note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 5.8 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 265 revision 1.5 (07-08-11) datasheet 13.4.2.36 port x mac transmit broadcast count register (mac_tx_brdcst_cnt_x) this register provides a counter of transmitted broadcast packets. the counter is cleared upon being read. register #: port0: 045dh size: 32 bits port1: 085dh port2: 0c5dh bits description type default 31:0 tx broadcast count of broadcast packets transmitted. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 266 smsc lan9303/lan9303i datasheet 13.4.2.37 port x mac transmit multicast count register (mac_tx_mulcst_cnt_x) this register provides a counter of transmitted mu lticast packets. the counter is cleared upon being read. register #: port0: 045eh size: 32 bits port1: 085eh port2: 0c5eh bits description type default 31:0 tx multicast count of multicast packets transmitted including mac control pause frames. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 267 revision 1.5 (07-08-11) datasheet 13.4.2.38 port x mac transmit late collision count register (mac_tx_latecol_cnt_x ) this register provides a counter of transmitted pa ckets which experienced a late collision. the counter is cleared upon being read. register #: port0: 045fh size: 32 bits port1: 085fh port2: 0c5fh bits description type default 31:0 tx late collision count of transmitted packets that experienced a late collision. this counter is incremented only in half-duplex operation. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 268 smsc lan9303/lan9303i datasheet 13.4.2.39 port x mac transmit excessive coll ision count register (mac_tx_exccol_cnt_x) this register provides a counter of transmitted packets which experienced 16 collisions. the counter is cleared upon being read. register #: port0: 0460h size: 32 bits port1: 0860h port2: 0c60h bits description type default 31:0 tx excessive collision count of transmitted packets that experienced 16 collisions. this counter is incremented only in half-duplex operation. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 1466 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 269 revision 1.5 (07-08-11) datasheet 13.4.2.40 port x mac transmit single collisi on count register (mac_tx_snglecol_cnt_x) this register provides a counter of transmitted packets which ex perienced exactly 1 collision. the counter is cleared upon being read. register #: port0: 0461h size: 32 bits port1: 0861h port2: 0c61h bits description type default 31:0 tx excessive collision count of transmitted packets that experienced exactly 1 collision. this counter is incremented only in half-duplex operation. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 573 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 270 smsc lan9303/lan9303i datasheet 13.4.2.41 port x mac transmit multiple collision count register (mac_tx_multicol_cnt_x) this register provides a counter of transmitted pa ckets which experienced between 2 and 15 collisions. the counter is cleared upon being read. register #: port0: 0462h size: 32 bits port1: 0862h port2: 0c62h bits description type default 31:0 tx excessive collision count of transmitted packets that experienced between 2 and 15 collisions. this counter is incremented only in half-duplex operation. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 664 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 271 revision 1.5 (07-08-11) datasheet 13.4.2.42 port x mac transmit total collision count register (mac_tx_totalcol_cnt_x) this register provides a counter of total collisions including late collisions. the counter is cleared upon being read. register #: port0: 0463h size: 32 bits port1: 0863h port2: 0c63h bits description type default 31:0 tx total collision total count of collisions including late collisions. this counter is incremented only in half-duplex operation. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 92 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 272 smsc lan9303/lan9303i datasheet 13.4.2.43 port x mac interrupt mask register (mac_imr_x) this register contains the port x interrupt mask. port x related interrupts in the port x mac interrupt pending register (mac_ipr_x) may be masked via this register. an interrupt is masked by setting the corresponding bit of this register. clearing a bit will unmask the interrupt. refer to chapter 5, "system interrupts," on page 55 for more information. note: there are no possible port x interrupt conditions available. this register exists for future use, and should be configured as indicated for future compatibility. register #: port0: 0480h size: 32 bits port1: 0880h port2: 0c80h bits description type default 31:8 reserved ro - 7:0 reserved note: these bits must be written as 11h r/w 11h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 273 revision 1.5 (07-08-11) datasheet 13.4.2.44 port x mac interrupt pending register (mac_ipr_x) this read-only register contains the pending port x interrupts. a set bit indicates an interrupt has been triggered. all interrupts in this register may be masked via the port x mac interrupt pending register (mac_ipr_x) register. refer to chapter 5, "system interrupts," on page 55 for more information. note: there are no possible port x interrupt conditions available. this register exists for future use. register #: port0: 0481h size: 32 bits port1: 0881h port2: 0c81h bits description type default 31:0 reserved ro - downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 274 smsc lan9303/lan9303i datasheet 13.4.3 switch engine csrs this section details the switch engine related csrs. these registers allow configuration and monitoring of the various switch engine components including the alr, vlan, port vid, and diffserv tables. a list of the general switch cs rs and their corresponding register numbers is included in table 13.14 . 13.4.3.1 switch engine alr command register (swe_alr_cmd) this register is used to manually read and write mac addresses from/into the alr table. for a read access, the switch engine alr read data 0 register (swe_alr_rd_dat_0) and switch engine alr read data 1 register (swe_alr_rd_dat_1) should be read following the setting of the get first entry bit or get next entry bit of this register. for write access, the switch engine alr write data 0 register (swe_alr_wr_dat_0) and switch engine alr write data 1 register (swe_alr_wr_dat_1) registers should first be written with the mac address, followed by the setting of the make entry bit of this register. the make pending bit in the switch engine alr command status register (swe_alr_cmd_sts) register indicates when the command is finished. refer to chapter 6, "switch fabric," on page 60 for more information. register #: 1800h size: 32 bits bits description type default 31:3 reserved ro - 2 make entry when set, the contents of swe_alr_wr_dat_0 and swe_alr_wr_dat_1 are written into the alr table. the alr logic determines the location where the entry is written. this command can also be used to change or delete a previous ly written or automatically learned entry. this bit has no affect when written low. this bit must be cleared once the alr make command is completed, which can be determined by the make pending bit in the switch engine alr command status register (swe_alr_cmd_sts) register. r/w 0b 1 get first entry when set, the alr read pointer is reset to the beginning of the alr table and the alr table is searched for the first valid entry, which is loaded into the swe_alr_rd_dat_0 and swe_alr_rd_dat_1 registers. the bit has no affect when written low. this bit must be cleared after it is set. r/w 0b 0 get next entry when set, the next valid entry in the alr mac address table is loaded into the swe_alr_rd_dat_0 and swe_alr_rd_dat_1 registers. this bit has no affect when written low. this bit must be cleared after it is set. r/w 0b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 275 revision 1.5 (07-08-11) datasheet 13.4.3.2 switch engine alr write data 0 register (swe_alr_wr_dat_0) this register is used in conjunction with the switch engine alr write data 1 register (swe_alr_wr_dat_1) and contains the first 32 bits of alr data to be manually written via the make entry command in the switch engine alr command register (swe_alr_cmd) . register #: 1801h size: 32 bits bits description type default 31:0 mac address this field contains the first 32 bits of the alr entry that will be written into the alr table. these bits correspond to the first 32 bits of the mac address. bit 0 holds the lsb of the first byte (the multicast bit). r/w 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 276 smsc lan9303/lan9303i datasheet 13.4.3.3 switch engine alr write data 1 register (swe_alr_wr_dat_1) this register is used in conjunction with the switch engine alr write data 0 register (swe_alr_wr_dat_0) and contains the last 32 bits of alr data to be manually written via the make entry command in the switch engine alr command register (swe_alr_cmd) . register #: 1802h size: 32 bits bits description type default 31:27 reserved ro - 26 valid when set, this bit makes the entry valid. it can be cleared to invalidate a previous entry that contained the specified mac address. r/w 0b 25 age/override this bit is used by the aging and forwarding processes. if the static bit of this register is cleared, this bit should be set so that the entry will age in the normal amount of time. if the static bit is set, this bit is used as a port state override bit. when set, packets received with a destination address that matches the mac address in the swe_alr_wr _dat_1 and swe_alr_wr_dat_0 registers will be forwarded regardless of the port state (except the disabled state) of the ingress or egress port(s). this is typically used to allow the reception of bpdu packets in the non-forwarding state. r/w 0b 24 static when this bit is set, this entry will not be removed by the aging process and/or be changed by the learning process. when this bit is cleared, this entry will be automatically removed after 5 to 10 minutes of inactivity. inactivity is defined as no packets being received with a source address that matches this mac address. note: this bit is normally set when adding manual entries. r/w 0b 23 filter when set, packets with a destination address that matches this mac address will be filtered. r/w 0b 22 priority enable when set, this bit enables usage of the priority field for this mac address entry. when clear, the priority field is not used. r/w 0b 21:19 priority these bits specify the priority that is used for packets with a destination address that matches this mac address. th is priority is only used if both the priority enable bit of this register and the da highest priority bit of the switch engine global ingress configuration register (swe_global_ingrss_cfg) are set. r/w 000b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 277 revision 1.5 (07-08-11) datasheet 18:16 port these bits indicate the port(s) associated with this mac address. when bit 18 is cleared, a single port is selected. when bit 18 is set, multiple ports are selected. r/w 000b 15:0 mac address these field contains the last 16 bits of the alr entry that will be written into the alr table. they correspond to the last 16 bits of the mac address. bit 15 holds the msb of the last byte (the last bit on the wire). the first 32 bits of the mac address are located in the switch engine alr write data 0 register (swe_alr_wr_dat_0) . r/w 0000h bits description type default value associated port(s) 000 port 0 001 port 1 010 port 2 011 reserved 100 port 0 and port 1 101 port 0 and port 2 110 port 1 and port 2 111 port 0, port 1, and port 2 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 278 smsc lan9303/lan9303i datasheet 13.4.3.4 switch engine alr read data 0 register (swe_alr_rd_dat_0) this register is used in conjunction with the switch engine alr read data 1 register (swe_alr_rd_dat_1) to read the alr table. it contains the first 32 bits of the alr entry and is loaded via the get first entry or get next entry commands in the switch engine alr command register (swe_alr_cmd) . this register is only valid when either of the valid or end of table bits in the switch engine alr read data 1 register (swe_alr_rd_dat_1) are set. register #: 1805h size: 32 bits bits description type default 31:0 mac address this field contains the first 32 bits of the alr entry. these bits correspond to the first 32 bits of the mac address. bit 0 holds the lsb of the first byte (the multicast bit). ro 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 279 revision 1.5 (07-08-11) datasheet 13.4.3.5 switch engine alr read data 1 register (swe_alr_rd_dat_1) this register is used in conjunction with the switch engine alr read data 0 register (swe_alr_rd_dat_0) to read the alr table. it contains the last 32 bits of the alr entry and is loaded via the get first entry or get next entry commands in the switch engine alr command register (swe_alr_cmd) . this register is only valid when either of the valid or end of table bits are set. register #: 1806h size: 32 bits bits description type default 31:27 reserved ro - 26 valid this bit is cleared when the get first entry or get next entry bits of the switch engine alr command register (swe_alr_cmd) are written. this bit is set when a valid entry is found in the alr table. this bit stays cleared when the top of the alr table is reached without finding an entry. ro 0b 25 end of table this bit indicates that the end of the alr table has been reached and further get next entry commands are not required. note: the valid bit may or may not be set when the end of the table is reached. ro 0b 24 static indicates that this entry will not be re moved by the aging process. when this bit is cleared, this entry will be automatically removed after 5 to 10 minutes of inactivity. inactivity is defined as no packets being received with a source address that matches this mac address. ro 0b 23 filter when set, indicates that packets with a destination address that matches this mac address will be filtered. ro 0b 22 priority enable indicates whether or not the usage of the priority field is enabled for this mac address entry. ro 0b 21:19 priority these bits specify the priority that is used for packets with a destination address that matches this mac address. th is priority is only used if both the priority enable bit of this register and the da highest priority bit in the switch engine global ingress configuration register (swe_global_ingrss_cfg) are set. ro 000b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 280 smsc lan9303/lan9303i datasheet 18:16 port these bits indicate the port(s) associated with this mac address. when bit 18 is cleared, a single port is selected. when bit 18 is set, multiple ports are selected. ro 000b 15:0 mac address these field contains the last 16 bits of the alr entry. they correspond to the last 16 bits of the mac address. bit 15 holds the msb of the last byte (the last bit on the wire). the first 32 bits of the mac address are located in the switch engine alr read data 0 register (swe_alr_rd_dat_0) . ro 0000h bits description type default value associated port(s) 000 port 0 001 port 1 010 port 2 011 reserved 100 port 0 and port 1 101 port 0 and port 2 110 port 1 and port 2 111 port 0, port 1, and port 2 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 281 revision 1.5 (07-08-11) datasheet 13.4.3.6 switch engine alr command status register (swe_alr_cmd_sts) this register indicates the current alr command status. note 13.68 the default value of this bit is 0 immediately following any switch fabric reset and then self-sets to 1 once the alr table is initialized. register #: 1808h size: 32 bits bits description type default 31:2 reserved ro - 1 alr init done when set, indicates that the alr table has finished being initialized by the reset process. the initialization is performed upon any reset that resets the switch fabric. the initialization takes approximately 20us. during this time, any received packet will be dropped. software should monitor this bit before writing any of the alr tables or registers. ro ss note 13.68 0 make pending when set, indicates that the make entry command is taking place. this bit is cleared once the make entry command has finished. ro sc 0b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 282 smsc lan9303/lan9303i datasheet 13.4.3.7 switch engine alr config uration register (swe_alr_cfg) this register controls the alr aging timer duration. register #: 1809h size: 32 bits bits description type default 31:1 reserved ro - 0 alr age test when set, this bit decreases the aging timer from 5 minutes to 50ms. r/w 0b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 283 revision 1.5 (07-08-11) datasheet 13.4.3.8 switch engine vlan command register (swe_vlan_cmd) this register is used to read and write the vlan or port vid tables. a write to this address performs the specified access. for a read access, the operation pending bit in the switch engine vlan command status register (swe_vlan_cmd_sts) indicates when the command is finished. the switch engine vlan read data register (swe_vlan_rd_data) can then be read. for a write access, the switch engine vlan write data register (swe_vlan_wr_data) register should be written first. the operation pending bit in the switch engine vlan command status register (swe_vlan_cmd_sts) indicates when the command is finished. register #: 180bh size: 32 bits bits description type default 31:6 reserved ro - 5 vlan rnw this bit specifies a read(1) or a write(0) command. r/w 0b 4 pvidnvlan when set, this bit selects the port vid table. when cleared, this bit selects the vlan table. r/w 0b 3:0 vlan/port this field specifies the vlan(0-15) or port(0-2) to be read or written. note: values outside of the valid range may cause unexpected results. r/w 0h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 284 smsc lan9303/lan9303i datasheet 13.4.3.9 switch engine vlan write data register (swe_vlan_wr_data) this register is used write the vlan or port vid tables. register #: 180ch size: 32 bits bits description type default 31:18 reserved ro - downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 285 revision 1.5 (07-08-11) datasheet 17:0 port default vi d and priority when the port vid table is selected (pvidnvlan=1 of the switch engine vlan command register (swe_vlan_cmd) ), bits 11:0 of this field specify the default vid for the port and bits 14:12 specify the default priority. all other bits of this field are reserved. these bits are used when a packet is received without a vlan tag or with a null vlan id. the default vid is also used when the 802.1q vlan disable bit is set. the default priority is also used when no other priority choice is selected. by default, the vid for all three ports is 1 and the priority for all three ports is 0. note: values of 0 and fffh should not be used since they are special vlan ids per the ieee 802.3q specification. vlan data when the vlan table is selected (pvidnvlan=0 of the switch engine vlan command register (swe_vlan_cmd) ), the bits form the vlan table entry as follows: r/w 0b bits description type default bits description default 17 member port 2 indicates the configuration of port 2 for this vlan entry. 1 = member - packets with a vid that matches this entry are allowed on ingress. the port is a member of the broadcast domain on egress. 0 = not a member - packets with a vid that matches this entry are filtered on ingress unless the admit non member bit in the switch engine admit non member register (swe_admt_n_member) is set for this port. the port is not a member of the broadcast domain on egress. 0b 16 un-tag port 2 when this bit is set, packets with a vid that matches this entry will have their tag removed when re-transmitted on port 2 when it is designated as a hybrid port via the buffer manager egress port type register (bm_egrss_port_type) . 0b 15 member port 1 see description for member port 2. 0b 14 un-tag port 1 see description for un-tag port 2. 0b 13 member port 0 see description for member port 2. 0b 12 un-tag port 0 see description for un-tag port 2. 0b 11:0 vid these bits specify the vlan id associated with this vlan entry. to disable a vlan entry, a value of 0 should be used. note: a value of 0 is considered a null vlan and should not normally be used other than to disable a vlan entry. note: a value of 3ffh is considered reserved by ieee 802.1q and should not be used. 000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 286 smsc lan9303/lan9303i datasheet 13.4.3.10 switch engine vlan read data register (swe_vlan_rd_data) this register is used to read the vlan or port vid tables. register #: 180eh size: 32 bits bits description type default 31:18 reserved ro - downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 287 revision 1.5 (07-08-11) datasheet 17:0 port default vi d and priority when the port vid table is selected (pvidnvlan=1 of the switch engine vlan command register (swe_vlan_cmd) ), bits 11:0 of this field specify the default vid for the port and bits 14:12 specify the default priority. all other bits of this field are reserved. these bits are used when a packet is received without a vlan tag or with a null vlan id. the default vid is also used when the 802.1q vlan disable bit is set. the default priority is also used when no other priority choice is selected. by default, the vid for all three ports is 1 and the priority for all three ports is 0. note: values of 0 and fffh should not be used since they are special vlan ids per the ieee 802.3q specification. vlan data when the vlan table is selected (pvidnvlan=0 of the switch engine vlan command register (swe_vlan_cmd) ), the bits form the vlan table entry as follows: ro 00000h bits description type default bits description default 17 member port 2 indicates the configuration of port 2 for this vlan entry. 1 = member - packets with a vid that matches this entry are allowed on ingress. the port is a member of the broadcast domain on egress. 0 = not a member - packets with a vid that matches this entry are filtered on ingress unless the admit non member bit in the switch engine admit non member register (swe_admt_n_member) is set for this port. the port is not a member of the broadcast domain on egress. 0b 16 un-tag port 2 when this bit is set, packets with a vid that matches this entry will have their tag remo ved when re-transmitted on port 2 when it is designated as a hybrid port via the buffer manager egress port type register (bm_egrss_port_type) 0b 15 member port 1 see description for member port 2. 0b 14 un-tag port 1 see description for un-tag port 2. 0b 13 member port 0 see description for member port 2. 0b 12 un-tag port 0 see description for un-tag port 2. 0b 11:0 vid these bits specify the vlan id associated with this vlan entry. to disable a vlan entry, a value of 0 should be used. note: a value of 0 is considered a null vlan and should not normally be used other than to disable a vlan entry. note: a value of 3ffh is considered reserved by ieee 802.1q and should not be used. 000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 288 smsc lan9303/lan9303i datasheet 13.4.3.11 switch engine vlan command status register (swe_vlan_cmd_sts) this register indicates the current vlan command status. register #: 1810h size: 32 bits bits description type default 31:1 reserved ro - 0 operation pending when set, this bit indicates that the read or write command is taking place. this bit is cleared once the command has finished. ro sc 0b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 289 revision 1.5 (07-08-11) datasheet 13.4.3.12 switch engine diffserv table command register (swe_diffserv_tbl_cfg) this register is used to read and write the di ffserv table. a write to this address performs the specified access. this table is used to map the received ip tos/cs to a priority. for a read access, the operation pending bit in the switch engine diffserv table command status register (swe_diffserv_tbl_cmd_sts) indicates when the command is finished. the switch engine diffserv table read data register (swe_diffserv_tbl_rd_data) can then be read. for a write access, the switch engine diffserv table write data register (swe_diffserv_tbl_wr_data) register should be written first. the operation pending bit in the switch engine diffserv table command stat us register (swe_diffserv_tbl_cmd_sts) indicates when the command is finished. register #: 1811h size: 32 bits bits description type default 31:8 reserved ro - 7 diffserv table rnw this bit specifies a read(1) or a write(0) command. r/w 0b 6 reserved ro - 5:0 diffserv table index this field specifies the tos/cs entry that is accessed. r/w 0h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 290 smsc lan9303/lan9303i datasheet 13.4.3.13 switch engine diffserv table writ e data register (swe_diffserv_tbl_wr_data) this register is used to write the diffserv table. the diffserv table is not initialized upon reset on power-up. if diffserv is enabled, the full table should be initialized by the host. register #: 1812h size: 32 bits bits description type default 31:3 reserved ro - 2:0 diffserv priority these bits specify the assigned receive priority for ip packets with a tos/cs field that matches this index. r/w 000b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 291 revision 1.5 (07-08-11) datasheet 13.4.3.14 switch engine diffserv table read data register (swe_diffserv_tbl_rd_data) this register is used to read the diffserv table. register #: 1813h size: 32 bits bits description type default 31:3 reserved ro - 2:0 diffserv priority these bits specify the assigned receive priority for ip packets with a tos/cs field that matches this index. ro 000b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 292 smsc lan9303/lan9303i datasheet 13.4.3.15 switch engine diffserv table command status register (swe_diffserv_tbl_cmd_sts) this register indicates the current diffserv command status. register #: 1814h size: 32 bits bits description type default 31:1 reserved ro - 0 operation pending when set, this bit indicates that the read or write command is taking place. this bit is cleared once the command has finished. ro sc 0b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 293 revision 1.5 (07-08-11) datasheet 13.4.3.16 switch engine global ingress conf iguration register (swe_global_ingrss_cfg) this register is used to configure the global ingress rules. register #: 1840h size: 32 bits bits description type default 31:16 reserved ro - 15 802.1q vlan disable when set, the vid from the vlan tag is ignored and the per port default vid (pvid) is used for purposes of vlan rules. this does not affect the packet tag on egress. r/w 0b 14 use tag when set, the priority from the vlan tag is enabled as a transmit priority queue choice. r/w 0b 13 allow monitor echo when set, monitoring packets are allowed to be echoed back to the source port. when cleared, monitoring packets, like other packets, are never sent back to the source port. this bit is useful when the monitor port wishes to receive its own igmp packets. r/w 0b 12:10 igmp monitor port this field is the port bit map w here ipv4 igmp packets are sent. r/w 0b 9 use ip when set, the ipv4 tos or ipv6 sc field is enabled as a transmit priority queue choice. r/w 0b 8 reserved r/w - 7 enable igmp monitoring when set, ipv4 igmp packets are monitored and sent to the igmp monitor port. r/w 0b 6 swe counter test when this bit is set the switch engine counters that normally clear to 0 when read will be set to 7fff_fffch when read. r/w 0b 5 da highest priority when this bit is set and the priority enable bit in the alr table for the destination mac address is set, the transmit priority queue that is selected is taken from the alr priority bits (see the switch engine alr read data 1 register (swe_alr_rd_dat_1) ). r/w 0b 4 filter multicast when this bit is set, packets with a multicast destination address are filtered if the address is not found in the alr table. broadcasts are not included in this filter. r/w 0b 3 drop unknown when this bit is set, packets with a unicast destination address are filtered if the address is not found in the alr table. r/w 0b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 294 smsc lan9303/lan9303i datasheet 2 use precedence when the priority is taken from an ipv4 packet (enabled via the use ip bit), this bit selects between precedence bits in the tos octet or the diffserv table. when set, ipv4 packets will use the precedence bits in the tos octet to select the transmit priority queue. when cleared, ipv4 packets will use the diffserv table to select the transmit priority queue. r/w 1b 1 vl higher priority when this bit is set and vlan priority is enabled (via the use tag bit), the priority from the vlan tag has higher priority than the ip tos/sc field. r/w 1b 0 vlan enable when set, vlan ingress rules are enabled. r/w 0b bits description type default downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 295 revision 1.5 (07-08-11) datasheet 13.4.3.17 switch engine port ingress conf iguration register (swe_port_ingrss_cfg) this register is used to configure the per port ingress rules. register #: 1841h size: 32 bits bits description type default 31:6 reserved ro - 5:3 enable learning on ingress when set, source addresses are learned when a packet is received on the corresponding port and the corresponding port state in the switch engine port state register (swe_port_state) is set to forwarding or learning. there is one enable bit per ingress port. bits 5,4,3 correspond to switch ports 2,1,0 respectively. r/w 111b 2:0 enable membership checking when set, vlan membership is checked when a packet is received on the corresponding port. the packet will be filtered if the ingress port is not a member of the vlan (unless the admit non member bit is set for the port in the switch engine admit non member register (swe_admt_n_member) ) for destination addresses that are found in the alr table, the packet will be filtered if the egress port is not a member of the vlan (for destination addresses that are not found in the alr table only the ingress port is checked for membership). the vlan enable bit in the switch engine global ingress configuration register (swe_global_ingrss_cfg) needs to be set for these bits to have an affect. there is one enable bit per ingress port. bits 2,1,0 correspond to switch ports 2,1,0 respectively. r/w 000b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 296 smsc lan9303/lan9303i datasheet 13.4.3.18 switch engine admit only vlan register (swe_admt_only_vlan) this register is used to configure the per port ingress rule for allowing only vlan tagged packets. register #: 1842h size: 32 bits bits description type default 31:3 reserved ro - 2:0 admit only vlan when set, untagged and priority tagged packets are filtered. the vlan enable bit in the switch engine global ingress configuration register (swe_global_ingrss_cfg) needs to be set for these bits to have an affect. there is one enable bit per ingress port. bits 2,1,0 correspond to switch ports 2,1,0 respectively. r/w 000b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 297 revision 1.5 (07-08-11) datasheet 13.4.3.19 switch engine port state register (swe_port_state) this register is used to configure the per port spanning tree state. register #: 1843h size: 32 bits bits description type default 31:6 reserved ro - 5:4 port state port 2 these bits specify the spanning tree port states for port 2. 00 = forwarding 01 = listening/blocking 10 = learning 11 = disabled r/w 00b 3:2 port state port 1 these bits specify the spanning tree port states for port 1. 00 = forwarding 01 = listening/blocking 10 = learning 11 = disabled r/w 00b 1:0 port state port 0 these bits specify the spanning tree port states for port 0. 00 = forwarding 01 = listening/blocking 10 = learning 11 = disabled r/w 00b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 298 smsc lan9303/lan9303i datasheet 13.4.3.20 switch engine priority to queue register (swe_pri_to_que) this register specifies the traffic class table that maps the packet priority into the egress queues. register #: 1845h size: 32 bits bits description type default 31:16 reserved ro - 15:14 priority 7 traffic class these bits specify the egress queue that is used for packets with a priority of 7. r/w 11b 13:12 priority 6 traffic class these bits specify the egress queue that is used for packets with a priority of 6. r/w 11b 11:10 priority 5 traffic class these bits specify the egress queue that is used for packets with a priority of 5. r/w 10b 9:8 priority 4 traffic class these bits specify the egress queue that is used for packets with a priority of 4. r/w 10b 7:6 priority 3 traffic class these bits specify the egress queue that is used for packets with a priority of 3. r/w 01b 5:4 priority 2 traffic class these bits specify the egress queue that is used for packets with a priority of 2. r/w 00b 3:2 priority 1 traffic class these bits specify the egress queue that is used for packets with a priority of 1. r/w 00b 1:0 priority 0 traffic class these bits specify the egress queue that is used for packets with a priority of 0. r/w 01b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 299 revision 1.5 (07-08-11) datasheet 13.4.3.21 switch engine port mi rroring register (swe_port_mirror) this register is used to configure port mirroring. register #: 1846h size: 32 bits bits description type default 31:9 reserved ro - 8 enable rx mirroring filtered when set, packets that would normally have been filtered are included in the receive mirroring function and are sent only to the sniffer port. when cleared, filtered packets are not mirrored. note: the ingress filtered count regist ers will still count these packets as filtered and the switch engine interrupt pending register (swe_ipr) will still register a drop interrupt. r/w 0b 7:5 sniffer port these bits specify the sniffer port that transmits packets that are monitored. bits 7,6,5 correspond to switch ports 2,1,0 respectively. note: only one port should be set as the sniffer. r/w 00b 4:2 mirrored port these bits specify if a port is to be mirrored. bits 4,3,2 correspond to switch ports 2,1,0 respectively. note: multiple ports can be set as mirrored. r/w 00b 1 enable rx mirroring this bit enables packets received on the mirrored ports to be also sent to the sniffer port. r/w 0b 0 enable tx mirroring this bit enables packets transmitted on the mirrored ports to be also sent to the sniffer port. r/w 0b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 300 smsc lan9303/lan9303i datasheet 13.4.3.22 switch engine ingress port type register (swe_ingrss_port_typ) this register is used to enable the special taggi ng mode used to determine the destination port based on the vlan tag contents. register #: 1847h size: 32 bits bits description type default 31:6 reserved ro - 5:4 ingress port type port 2 a setting of 11b enables the usage of the vlan tag to specify the packet destination. all other values disable this feature. r/w 00b 3:2 ingress port type port 1 a setting of 11b enables the usage of the vlan tag to specify the packet destination. all other values disable this feature. r/w 00b 1:0 ingress port type port 0 a setting of 11b enables the usage of the vlan tag to specify the packet destination. all other values disable this feature. r/w 00b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 301 revision 1.5 (07-08-11) datasheet 13.4.3.23 switch engine broadcast thr ottling register (swe_bcst_throt) this register configures the broadcast input rate throttling. register #: 1848h size: 32 bits bits description type default 31:27 reserved ro - 26 broadcast throttle enable port 2 this bit enables broadcast input rate throttling on port 2. r/w 0b 25:18 broadcast throttle level port 2 these bits specify the number of bytes x 64 allowed to be received per every 1.72ms interval. r/w 02h 17 broadcast throttle enable port 1 this bit enables broadcast input rate throttling on port 1. r/w 0b 16:9 broadcast throttle level port 1 these bits specify the number of bytes x 64 allowed to be received per every 1.72ms interval. r/w 02h 8 broadcast throttle enable port 0 this bit enables broadcast input rate throttling on port 0. r/w 0b 7:0 broadcast throttle level port 0 these bits specify the number of bytes x 64 allowed to be received per every 1.72ms interval. r/w 02h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 302 smsc lan9303/lan9303i datasheet 13.4.3.24 switch engine admit non member register (swe_admt_n_member) this register is used to allow access to a vlan even if the ingress port is not a member. register #: 1849h size: 32 bits bits description type default 31:3 reserved ro - 2:0 admit non member when set, a received packet is accepted even if the ingress port is not a member of the destination vlan. the vlan still must be active in the switch. there is one bit per ingress port. bits 2,1,0 correspond to switch ports 2,1,0 respectively. r/w 000b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 303 revision 1.5 (07-08-11) datasheet 13.4.3.25 switch engine ingress rate conf iguration register (swe_ingrss_rate_cfg) this register, along with the settings accessible via the switch engine ingress rate command register (swe_ingrss_rate_cmd) , is used to configure the ingress rate metering/coloring. register #: 184ah size: 32 bits bits description type default 31:3 reserved ro - 2:1 rate mode these bits configure the rate metering/coloring mode. 00 = source po rt & priority 01 = source port only 10 = priority only 11 = reserved r/w 00b 0 ingress rate enable when set, ingress rates are metered and packets are colored and dropped if necessary. r/w 0b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 304 smsc lan9303/lan9303i datasheet 13.4.3.26 switch engine ingress rate co mmand register (swe_ingrss_rate_cmd) this register is used to indirectly read and write the ingress rate metering/color table registers. a write to this address performs the specified access. for a read access, the operation pending bit in the switch engine ingress rate command status register (swe_ingrss_rate_cmd_sts) indicates when the command is finished. the switch engine ingress rate read data register (swe_ingrss_rate_rd_data) can then be read. for a write access, the switch engine ingress rate write data register (swe_ingrss_rate_wr_data) should be written first. the operation pending bit in the switch engine ingress rate command status register (swe_ingrss_rate_cmd_sts) indicates when the command is finished. for details on 16-bit wide ingress rate table registers indirectly accessible by this register, see section 13.4.3.26.1 below. register #: 184bh size: 32 bits bits description type default 31:8 reserved ro - 7 ingress rate rnw these bits specify a read(1) or write(0) command. r/w 0b 6:5 type these bits select between the ingress rate metering/color table registers as follows: 00 = reserved 01 = committed information rate registers (uses cis address field) 10 = committed burst register 11 = excess burst register r/w 00b 4:0 cir address these bits select one of the 24 committed information rate registers. when rate mode is set to source port & priority in the switch engine ingress rate configuration register (swe_ingrss_rate_cfg) , the first set of 8 registers (cir addresses 0-7) are for to port 0, the second set of 8 registers (cir addresses 8-15) are for port 1, and the third set of registers (cir addresses 16-23) are for port 2. priority 0 is the lower register of each set (e.g. 0, 8, and 16). when rate mode is set to source port only, the first register (cir address 0) is for port 0, the second register (cir address 1) is for port 1, and the third register (cir address 2) is for port 2. when rate mode is set to priority only, the first register (cir address 0) is for priority 0, the second register (cir address 1) is for priority 1, and so forth up to priority 23. note: values outside of the valid range may cause unexpected results. r/w 0h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 305 revision 1.5 (07-08-11) datasheet 13.4.3.26.1 ingress rate table registers the ingress rate metering/color table consists of 24 committed information rate (cir) registers (one per port/priority), a committed burst size register, and an excess burst size register. all metering/color table registers are 16-bits in size and are accessed indirectly via the switch engine ingress rate command register (swe_ingrss_rate_cmd) . descriptions of these registers are detailed in table 13.15 below. table 13.15 metering/color table register descriptions description type default excess burst size this register specifies the maximum excess burst size in bytes. bursts larger than this value that exceed the excess data rate are dropped. note: either this value or the committed burst size should be set larger than or equal to the largest possible packet expected. note: all of the excess burst token buckets are initialized to this default value. if a lower value is programmed into this register, the token buckets will need to be normally depleted below this value before this value has any affect on limiting the to ken bucket maximum values. this register is 16-bits wide. r/w 0600h committed burst size this register specifies the maximum committed burst size in bytes. bursts larger than this value that exceed the committed data rate are subjected to random dropping. note: either this value or the excess burst size should be set larger than or equal to the largest possible packet expected. note: all of the committed burst token buckets are initialized to this default value. if a lower value is programmed into this register, the token buckets will need to be normally depleted below this value before this value has any affect on limiting the token bucket maximum values. this register is 16-bits wide. r/w 0600h committed informati on rate (cir) these registers specify the committed data rate for the port/priority pair. the rate is specified in time per byte. the time is this value plus 1 times 20ns. there are 24 of these registers each 16-bits wide. r/w 0014h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 306 smsc lan9303/lan9303i datasheet 13.4.3.27 switch engine ingress rate command status register (swe_ingrss_rate_cmd_sts) this register indicates the current ingress rate command status. register #: 184ch size: 32 bits bits description type default 31:1 reserved ro - 0 operation pending when set, indicates that the read or write command is taking place. this bit is cleared once the command has finished. ro sc 0b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 307 revision 1.5 (07-08-11) datasheet 13.4.3.28 switch engine ingress rate write data register (swe_ingrss_rate_wr_data) this register is used to write the ingress rate table registers. register #: 184dh size: 32 bits bits description type default 31:16 reserved ro - 15:0 data this is the data to be written to the ingress rate table registers as specified in the switch engine ingress rate command register (swe_ingrss_rate_cmd) . refer to section 13.4.3.26.1, "ingress rate table registers," on page 305 for details on these registers. r/w 0000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 308 smsc lan9303/lan9303i datasheet 13.4.3.29 switch engine ingress rate read data register (swe_ingrss_rate_rd_data) this register is used to read the ingress rate table registers. register #: 184eh size: 32 bits bits description type default 31:16 reserved ro - 15:0 data this is the read data from the ingress rate table registers as specified in the switch engine ingress rate command register (swe_ingrss_rate_cmd) . refer to section 13.4.3.26.1, "ingress rate table registers," on page 305 for details on these registers. ro 0000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 309 revision 1.5 (07-08-11) datasheet 13.4.3.30 switch engine port 0 ingress filtered count register (swe_filtered_cnt_0) this register counts the number of packets filtered at ingress on port 0. this count includes packets filtered due to broadcast throttling but does not include packets dropped due to ingress rate limiting (which are counted separately). register #: 1850h size: 32 bits bits description type default 31:0 filtered this field is a count of packets filtered at ingress and is cleared when read. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 310 smsc lan9303/lan9303i datasheet 13.4.3.31 switch engine port 1 ingress filtered count register (swe_filtered_cnt_1) this register counts the number of packets filtered at ingress on port 1. this count includes packets filtered due to broadcast throttling but does not include packets dropped due to ingress rate limiting (which are counted separately). register #: 1851h size: 32 bits bits description type default 31:0 filtered this field is a count of packets filtered at ingress and is cleared when read. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 311 revision 1.5 (07-08-11) datasheet 13.4.3.32 switch engine port 2 ingress filtered count register (swe_filtered_cnt_2) this register counts the number of packets filtered at ingress on port 2. this count includes packets filtered due to broadcast throttling but does not include packets dropped due to ingress rate limiting (which are counted separately). register #: 1852h size: 32 bits bits description type default 31:0 filtered this field is a count of packets filtered at ingress and is cleared when read. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 312 smsc lan9303/lan9303i datasheet 13.4.3.33 switch engine port 0 ingress vlan priority regeneration table register (swe_ingrss_regen_tbl_0) this register provides the ability to map the received vlan priority to a regenerated priority. the regenerated priority is used in determining the outp ut priority queue. by default, the regenerated priority is identical to the received priority. register #: 1855h size: 32 bits bits description type default 31:24 reserved ro - 23:21 regen7 these bits specify the regenerated priority for received priority 7. r/w 7h 20:18 regen6 these bits specify the regenerated priority for received priority 6. r/w 6h 17:15 regen5 these bits specify the regenerated priority for received priority 5. r/w 5h 14:12 regen4 these bits specify the regenerated priority for received priority 4. r/w 4h 11:9 regen3 these bits specify the regenerated priority for received priority 3. r/w 3h 8:6 regen2 these bits specify the regenerated priority for received priority 2. r/w 2h 5:3 regen1 these bits specify the regenerated priority for received priority 1. r/w 1h 2:0 regen0 these bits specify the regenerated priority for received priority 0. r/w 0h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 313 revision 1.5 (07-08-11) datasheet 13.4.3.34 switch engine port 1 ingress vlan priority regeneration table register (swe_ingrss_regen_tbl_1) this register provides the ability to map the received vlan priority to a regenerated priority. the regenerated priority is used in determining the outp ut priority queue. by default, the regenerated priority is identical to the received priority. register #: 1856h size: 32 bits bits description type default 31:24 reserved ro - 23:21 regen7 these bits specify the regenerated priority for received priority 7. r/w 7h 20:18 regen6 these bits specify the regenerated priority for received priority 6. r/w 6h 17:15 regen5 these bits specify the regenerated priority for received priority 5. r/w 5h 14:12 regen4 these bits specify the regenerated priority for received priority 4. r/w 4h 11:9 regen3 these bits specify the regenerated priority for received priority 3. r/w 3h 8:6 regen2 these bits specify the regenerated priority for received priority 2. r/w 2h 5:3 regen1 these bits specify the regenerated priority for received priority 1. r/w 1h 2:0 regen0 these bits specify the regenerated priority for received priority 0. r/w 0h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 314 smsc lan9303/lan9303i datasheet 13.4.3.35 switch engine port 2 ingress vlan priority regeneration table register (swe_ingrss_regen_tbl_2) this register provides the ability to map the received vlan priority to a regenerated priority. the regenerated priority is used in determining the outp ut priority queue. by default, the regenerated priority is identical to the received priority. register #: 1857h size: 32 bits bits description type default 31:24 reserved ro - 23:21 regen7 these bits specify the regenerated priority for received priority 7. r/w 7h 20:18 regen6 these bits specify the regenerated priority for received priority 6. r/w 6h 17:15 regen5 these bits specify the regenerated priority for received priority 5. r/w 5h 14:12 regen4 these bits specify the regenerated priority for received priority 4. r/w 4h 11:9 regen3 these bits specify the regenerated priority for received priority 3. r/w 3h 8:6 regen2 these bits specify the regenerated priority for received priority 2. r/w 2h 5:3 regen1 these bits specify the regenerated priority for received priority 1. r/w 1h 2:0 regen0 these bits specify the regenerated priority for received priority 0. r/w 0h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 315 revision 1.5 (07-08-11) datasheet 13.4.3.36 switch engine port 0 learn disc ard count register (swe_lrn_discrd_cnt_0) this register counts the number of mac addresses on port 0 that were not learned or were overwritten by a different address due to address table space limitations. register #: 1858h size: 32 bits bits description type default 31:0 learn discard this field is a count of mac addresses not learned or overwritten and is cleared when read. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 316 smsc lan9303/lan9303i datasheet 13.4.3.37 switch engine port 1 learn disc ard count register (swe_lrn_discrd_cnt_1) this register counts the number of mac addresses on port 1 that were not learned or were overwritten by a different address due to address table space limitations. register #: 1859h size: 32 bits bits description type default 31:0 learn discard this field is a count of mac addresses not learned or overwritten and is cleared when read. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 317 revision 1.5 (07-08-11) datasheet 13.4.3.38 switch engine port 2 learn disc ard count register (swe_lrn_discrd_cnt_2) this register counts the number of mac addresses on port 2 that were not learned or were overwritten by a different address due to address table space limitations. register #: 185ah size: 32 bits bits description type default 31:0 learn discard this field is a count of mac addresses not learned or overwritten and is cleared when read. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 318 smsc lan9303/lan9303i datasheet 13.4.3.39 switch engine interr upt mask register (swe_imr) this register contains the sw itch engine interrupt mask, wh ich masks the interrupts in the switch engine interrupt pending register (swe_ipr) . all switch engine interrupts are masked by setting the interrupt mask bit. clearing this bit will unmask the interrupts. refer to chapter 5, "system interrupts," on page 55 for more information. register #: 1880h size: 32 bits bits description type default 31:1 reserved ro - 0 interrupt mask when set, this bit masks interrupts from the switch engine. the status bits in the switch engine interrupt pending register (swe_ipr) are not affected. r/w 1b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 319 revision 1.5 (07-08-11) datasheet 13.4.3.40 switch engine interr upt pending register (swe_ipr) this register contains the switch engine interrupt status. the status is double buffered. all interrupts in this register may be masked via the switch engine interrupt mask register (swe_imr) register. refer to chapter 5, "system interrupts," on page 55 for more information. register #: 1881h size: 32 bits bits description type default 31:15 reserved ro - 14:11 drop reason b when the set b valid bit is set, these bits indicate the reason a packet was dropped per the table below: rc 0h bit values description 0000 admit only vlan was set and the packet was untagged or priority tagged. 0001 the destination address was not in the alr table (unknown or broadcast), enable membership checking on ingress was set, admit non member was cleared and the source port was not a member of the incoming vlan. 0010 the destination address was found in the alr table but the source port was not in the forwarding state. 0011 the destination address was found in the alr table but the destination port was not in the forwarding state. 0100 the destination address was found in the alr table but enable membership checking on ingress was set and the destination port was not a member of the incoming vlan. 0101 the destination address was found in the alr table but the enable membership checking on ingress was set, admit non member was cleared and the source port was not a member of the incoming vlan. 0110 drop unknown was set and the destination address was a unicast but not in the alr table. 0111 filter multicast was set and the destination address was a multicast and not in the alr table. 1000 the packet was a broadcast but exceeded the broadcast throttling limit. 1001 the destination address was not in the alr table (unknown or broadcast) and the source port was not in the forwarding state. 1010 the destination address was found in the alr table but the source and destination ports were the same. 1011 the destination address was found in the alr table and the filter bit was set for that address. 1100 reserved. 1101 reserved 1110 a packet was received with a vlan id of fffh. 1111 reserved downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 320 smsc lan9303/lan9303i datasheet 10:9 source port b when the set b valid bit is set, these bits indicate the source port on which the packet was dropped. 00 = port 0 01 = port 1 10 = port 2 11 = reserved rc 00b 8 set b valid when set, bits 14:9 are valid. rc 0b 7:4 drop reason a when the set a valid bit is set, these bits indicate the reason a packet was dropped. see the drop reason b description above for definitions of each value of this field. rc 0h 3:2 source port a when the set a valid bit is set, these bits indicate the source port on which the packet was dropped. 00 = port 0 01 = port 1 10 = port 2 11 = reserved rc 00b 1 set a valid when set, bits 7:2 are valid. rc 0b 0 interrupt pending when set, a packet dropped event(s) is indicated. rc 0b bits description type default downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 321 revision 1.5 (07-08-11) datasheet 13.4.4 buffer manager csrs this section details the buffer manager (bm) regi sters. these registers allow configuration and monitoring of the switch buffer levels and usage. a list of the general switch csrs and their corresponding register numbers is included in table 13.14 . 13.4.4.1 buffer manager configuration register (bm_cfg) this register enables egress rate pacing and ingress rate discarding. register #: 1c00h size: 32 bits bits description type default 31:7 reserved ro - 6 bm counter test when this bit is set, buffer manager (bm) counters that normally clear to 0 when read, will be set to 7fff_fffc when read. r/w 0b 5 fixed priority queue servicing when set, output queues are serviced wi th a fixed priority ordering. when cleared, output queues are serviced with a weighted round robin ordering. r/w 0b 4:2 egress rate enable when set, egress rate pacing is enabled. bits 4,3,2 correspond to switch ports 2,1,0 respectively. r/w 0b 1 drop on yellow when this bit is set, packets that exceed the ingress committed burst size (colored yellow) are subjected to random discard. note: see section 13.4.3.26, "switch engine ingress rate command register (swe_ingrss_rate_cmd)," on page 304 for information on configuring the ingress committed burst size. r/w 0b 0 drop on red when this bit is set, packets that e xceed the ingress excess burst size (colored red) are discarded. note: see section 13.4.3.26, "switch engine ingress rate command register (swe_ingrss_rate_cmd)," on page 304 for information on configuring the ingress excess burst size. r/w 0b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 322 smsc lan9303/lan9303i datasheet 13.4.4.2 buffer manager drop level register (bm_drop_lvl) this register configures the overall buffer usage limits. register #: 1c01h size: 32 bits bits description type default 31:16 reserved ro - 15:8 drop level low these bits specify the buffer limit that can be used per ingress port during times when 2 or 3 ports are active. each buffer is 128 bytes. note: a port is active when 36 buffers are in use for that port. r/w 49h 7:0 drop level high these bits specify the buffer limit that can be used per ingress port during times when 1 port is active. each buffer is 128 bytes. note: a port is active when 36 buffers are in use for that port. r/w 64h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 323 revision 1.5 (07-08-11) datasheet 13.4.4.3 buffer manager flow control pause level register (bm_fc_pause_lvl) this register configures the buffer usage leve l when a pause frame or backpressure is sent. register #: 1c02h size: 32 bits bits description type default 31:16 reserved ro - 15:8 pause level low these bits specify the buffer usage level during times when 2 or 3 ports are active. each buffer is 128 bytes. note: a port is active when 36 buffers are in use for that port. r/w 21h 7:0 pause level high these bits specify the buffer usage level during times when 1 port is active. each buffer is 128 bytes. note: a port is active when 36 buffers are in use for that port. r/w 3ch downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 324 smsc lan9303/lan9303i datasheet 13.4.4.4 buffer manager flow control re sume level register (bm_fc_resume_lvl) this register configures the buffer usage level when a pause frame with a pause value of 1 is sent. register #: 1c03h size: 32 bits bits description type default 31:16 reserved ro - 15:8 resume level low these bits specify the buffer usage level during times when 2 or 3 ports are active. each buffer is 128 bytes. note: a port is active when 36 buffers are in use for that port. r/w 03h 7:0 resume level high these bits specify the buffer usage level during times when 0 or 1 ports are active. each buffer is 128 bytes. note: a port is active when 36 buffers are in use for that port. r/w 07h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 325 revision 1.5 (07-08-11) datasheet 13.4.4.5 buffer manager broadcast buffer level register (bm_bcst_lvl) this register configures the buffer usage limit s for broadcasts, multicasts, and unknown unicasts. register #: 1c04h size: 32 bits bits description type default 31:8 reserved ro - 7:0 broadcast drop level these bits specify the maximum number of buffers that can be used by broadcasts, multicasts, and unknown unicasts. each buffer is 128 bytes. r/w 31h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 326 smsc lan9303/lan9303i datasheet 13.4.4.6 buffer manager port 0 drop count register (bm_drp_cnt_src_0) this register counts the number of packets dropped by the buffer manager that were received on port 0. this count includes packets dropped due to buffer space limits and ingress rate limit discarding (red and random yellow dropping). register #: 1c05h size: 32 bits bits description type default 31:0 dropped count these bits count the number of dropped packets received on port 0 and is cleared when read. note: the counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 327 revision 1.5 (07-08-11) datasheet 13.4.4.7 buffer manager port 1 drop count register (bm_drp_cnt_src_1) this register counts the number of packets dropped by the buffer manager that were received on port 1. this count includes packets dropped due to buffer space limits and ingress rate limit discarding (red and random yellow dropping). register #: 1c06h size: 32 bits bits description type default 31:0 dropped count these bits count the number of dropped packets received on port 1 and is cleared when read. note: the counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 328 smsc lan9303/lan9303i datasheet 13.4.4.8 buffer manager port 2 drop count register (bm_drp_cnt_src_2) this register counts the number of packets dropped by the buffer manager that were received on port 2. this count includes packets dropped due to buffer space limits and ingress rate limit discarding (red and random yellow dropping). register #: 1c07h size: 32 bits bits description type default 31:0 dropped count these bits count the number of dropped packets received on port 2 and is cleared when read. note: the counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 329 revision 1.5 (07-08-11) datasheet 13.4.4.9 buffer manager reset status register (bm_rst_sts) this register indicates when the buffer manager has been initialized by the reset process. note 13.69 the default value of this bit is 0 immediately following any switch fabric reset and then self-sets to 1 once the alr table is initialized. register #: 1c08h size: 32 bits bits description type default 31:1 reserved ro - 0 bm ready when set, indicates the buffer manager tables have finished being initialized by the reset process. the initialization is performed upon any reset that resets the switch fabric. ro ss note 13.69 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 330 smsc lan9303/lan9303i datasheet 13.4.4.10 buffer manager random discard tabl e command register (bm_rndm_dscrd_tbl_cmd) this register is used to read and write the rand om discard weight table. a write to this address performs the specified access. this table is used to set the packet drop probability verses the buffer usage. for a read access, the buffer manager random discard table read data register (bm_rndm_dscrd_tbl_rdata) can be read following a write to this register. for a write access, the buffer manager random discard table write data register (bm_rndm_dscrd_tbl_wdata) should be written before writing this register. register #: 1c09h size: 32 bits bits description type default 31:5 reserved ro - 4 random discard weight table rnw specifies a read (1) or a write (0) command. r/w 0b 3:0 random discard weight table index specifies the buffer usage range that is accessed. there are a total of 16 probability entries. each entry corresponds to a range of the number of buffers used by the ingress port. the ranges are structured to give more resolution towards the lower buffer usage end. r/w 0h bit values buffer usage level 0000 0 to 7 0001 8 to 15 0010 16 to 23 0011 24 to 31 0100 32 to 39 0101 40 to 47 0110 48 to 55 0111 56 to 63 1000 64 to 79 1001 80 to 95 1010 96 to 111 1011 112 to 127 1100 128 to 159 1101 160 to 191 1110 192 to 223 1111 224 to 255 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 331 revision 1.5 (07-08-11) datasheet 13.4.4.11 buffer manager random discard table write data register (bm_rndm_dscrd_tbl_wdata) this register is used to write the random discard weight table. note: the random discard weight table is not initialized upon reset or power-up. if a random discard is enabled, the full table should be initialized by the host. register #: 1c0ah size: 32 bits bits description type default 31:10 reserved ro - 9:0 drop probability these bits specify the discard probability of a packet that has been colored yellow by the ingress metering. the probability is given in 1/1024s. for example, a setting of 1 is one in 1024, or approximately 0.1%. a setting of all ones (1023) is 1023 in 1024, or approximately 99.9%. there are a total of 16 probability entries. each entry corresponds to a range of the number of buffers used by the ingress port, as specified in section 13.4.4.10, "buffer manager random discard table command register (bm_rndm_dscrd_tbl_cmd)" . r/w 000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 332 smsc lan9303/lan9303i datasheet 13.4.4.12 buffer manager random discard table read data register (bm_rndm_dscrd_tbl_rdata) this register is used to read the random discard weight table. register #: 1c0bh size: 32 bits bits description type default 31:10 reserved ro - 9:0 drop probability these bits specify the discard probability of a packet that has been colored yellow by the ingress metering. the probability is given in 1/1024s. for example, a setting of 1 is one in 1024, or approximately 0.1%. a setting of all ones (1023) is 1023 in 1024, or approximately 99.9%. there are a total of 16 probability entries. each entry corresponds to a range of the number of buffers used by the ingress port, as specified in section 13.4.4.10, "buffer manager random discard table command register (bm_rndm_dscrd_tbl_cmd)" . ro 000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 333 revision 1.5 (07-08-11) datasheet 13.4.4.13 buffer manager egress port type register (bm_egrss_port_type) this register is used to configure the egress vlan tagging rules. see section 6.5.6, "adding, removing, and changing vlan tags," on page 85 for additional details. register #: 1c0ch size: 32 bits bits description type default 31:23 reserved ro - 22 vid/priority select port 2 this bit determines the vid and priority in inserted or changed tags. 0: the default vid of the ingress port / priority calculated on ingress. 1: the default vid / priority of the egress port. this is only used when the egress port type is set as hybrid. r/w 0b 21 insert tag port 2 when set, untagged packets will have a tag added.the vid and priority is determined by the vid/priority select port 2 bit. the un-tag bit in the vlan table for the default vlan id also needs to be cleared in order for the tag to be inserted. this is only used when the egress port type is set as hybrid. r/w 0b 20 change vlan id port 2 when set, regular tagged packets will have their vlan id overwritten with the default vlan id of either the ingress or egress port, as determined by the vid/priority select port 2 bit. the change tag bit also needs to be set. the un-tag bit in the vlan table for the incoming vlan id also needs to be cleared, otherwise the tag will be removed instead. priority tagged packets will have their vlan id overwritten with the default vlan id of either the ingress or egress port independent of this bit. this is only used when the egress port type is set as hybrid. r/w 0b 19 change priority port 2 when set, regular tagged and priority tagged packets will have their priority overwritten with the priority determined by the vid/priority select port 2 bit. for regular tagged packets, the change tag bit also needs to be set. the un-tag bit in the vlan table for the incoming vlan id also needs to be cleared, otherwise the tag would be removed instead. this is only used when the egress port type is set as hybrid. r/w 0b 18 change tag port 2 when set, allows the change tag and change priority bits to affect regular tagged packets. this bit has no affect on priority tagged packets. this is only used when the egress port type is set as hybrid. r/w 0b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 334 smsc lan9303/lan9303i datasheet 17:16 egress port type port 2 these bits set the egress port type which determines the tagging/un-tagging rules. r/w 0b 15 reserved ro - 14 vid/priority select port 1 identical to vid/priority select port 2 definition above. r/w 0b 13 insert tag port 1 identical to insert tag port 2 definition above. r/w 0b 12 change vlan id port 1 identical to change vlan id port 2 definition above. r/w 0b 11 change priority port 1 identical to change priority port 2 definition above. r/w 0b 10 change tag port 1 identical to change tag port 2 definition above. r/w 0b 9:8 egress port type port 1 identical to egress port type port 2 definition above. r/w 0b 7 reserved ro - 6 vid/priority select port 0 identical to vid/priority select port 2 definition above. r/w 0b 5 insert tag port 0 identical to insert tag port 2 definition above. r/w 0b 4 change vlan id port 0 identical to change vlan id port 2 definition above. r/w 0b 3 change priority port 0 identical to change priority port 2 definition above. r/w 0b 2 change tag port 0 identical to change tag port 2 definition above. r/w 0b 1:0 egress port type port 0 identical to egress port type port 2 definition above. r/w 0b bits description type default bit values egress port type 00 dumb packets from regular ports pass untouched. special tagged packets from the external mii port have their tagged stripped. 01 access tagged packets (including special tagged packets from the external mii port) have their tagged stripped. 10 hybrid supports a mix of tagging, un-tagging and changing tags. see section 6.5.6, "adding, removing, and changing vlan tags," on page 85 for additional details. 11 cpu a special tag is added to indicate the source of the packet. see section 6.5.6, "adding, removing, and changing vlan tags," on page 85 for additional details. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 335 revision 1.5 (07-08-11) datasheet 13.4.4.14 buffer manager port 0 egress rate priority queue 0/1 register (bm_egrss_rate_00_01) this register, along with the buffer manager configuration register (bm_cfg) , is used to configure the egress rate pacing. register #: 1c0dh size: 32 bits bits description type default 31:26 reserved ro - 25:13 egress rate port 0 priority queue 1 these bits specify the egress data rate for the port 0 priority queue 1. the rate is specified in time per byte. the time is this value plus 1 times 20ns. r/w 0000h 12:0 egress rate port 0 priority queue 0 these bits specify the egress data rate for the port 0 priority queue 0. the rate is specified in time per byte. the time is this value plus 1 times 20ns. r/w 0000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 336 smsc lan9303/lan9303i datasheet 13.4.4.15 buffer manager port 0 egress rate priority queue 2/3 register (bm_egrss_rate_02_03) this register, along with the buffer manager configuration register (bm_cfg) , is used to configure the egress rate pacing. register #: 1c0eh size: 32 bits bits description type default 31:26 reserved ro - 25:13 egress rate port 0 priority queue 3 these bits specify the egress data rate for the port 0 priority queue 3. the rate is specified in time per byte. the time is this value plus 1 times 20ns. r/w 0000h 12:0 egress rate port 0 priority queue 2 these bits specify the egress data rate for the port 0 priority queue 2. the rate is specified in time per byte. the time is this value plus 1 times 20ns. r/w 0000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 337 revision 1.5 (07-08-11) datasheet 13.4.4.16 buffer manager port 1 egress rate priority queue 0/1 register (bm_egrss_rate_10_11) this register, along with the buffer manager configuration register (bm_cfg) , is used to configure the egress rate pacing. register #: 1c0fh size: 32 bits bits description type default 31:26 reserved ro - 25:13 egress rate port 1 priority queue 1 these bits specify the egress data rate for the port 1 priority queue 1. the rate is specified in time per byte. the time is this value plus 1 times 20ns. r/w 0000h 12:0 egress rate port 1 priority queue 0 these bits specify the egress data rate for the port 1 priority queue 0. the rate is specified in time per byte. the time is this value plus 1 times 20ns. r/w 0000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 338 smsc lan9303/lan9303i datasheet 13.4.4.17 buffer manager port 1 egress rate priority queue 2/3 register (bm_egrss_rate_12_13) this register, along with the buffer manager configuration register (bm_cfg) , is used to configure the egress rate pacing. register #: 1c10h size: 32 bits bits description type default 31:26 reserved ro - 25:13 egress rate port 1 priority queue 3 these bits specify the egress data rate for the port 1 priority queue 3. the rate is specified in time per byte. the time is this value plus 1 times 20ns. r/w 0000h 12:0 egress rate port 1 priority queue 2 these bits specify the egress data rate for the port 1 priority queue 2. the rate is specified in time per byte. the time is this value plus 1 times 20ns. r/w 0000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 339 revision 1.5 (07-08-11) datasheet 13.4.4.18 buffer manager port 2 egress rate priority queue 0/1 register (bm_egrss_rate_20_21) this register, along with the buffer manager configuration register (bm_cfg) , is used to configure the egress rate pacing. register #: 1c11h size: 32 bits bits description type default 31:26 reserved ro - 25:13 egress rate port 2 priority queue 1 these bits specify the egress data rate for the port 2 priority queue 1. the rate is specified in time per byte. the time is this value plus 1 times 20ns. r/w 0000h 12:0 egress rate port 2 priority queue 0 these bits specify the egress data rate for the port 2 priority queue 0. the rate is specified in time per byte. the time is this value plus 1 times 20ns. r/w 0000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 340 smsc lan9303/lan9303i datasheet 13.4.4.19 buffer manager port 2 egress rate priority queue 2/3 register (bm_egrss_rate_22_23) this register, along with the buffer manager configuration register (bm_cfg) , is used to configure the egress rate pacing. register #: 1c12h size: 32 bits bits description type default 31:26 reserved ro - 25:13 egress rate port 2 priority queue 3 these bits specify the egress data rate for the port 2 priority queue 3. the rate is specified in time per byte. the time is this value plus 1 times 20ns. r/w 0000h 12:0 egress rate port 2 priority queue 2 these bits specify the egress data rate for the port 2 priority queue 2. the rate is specified in time per byte. the time is this value plus 1 times 20ns. r/w 0000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 341 revision 1.5 (07-08-11) datasheet 13.4.4.20 buffer manager port 0 default vlan id and priority register (bm_vlan_0) this register is used to specify the default vlan id and priority of port 0. register #: 1c13h size: 32 bits bits description type default 31:15 reserved ro - 14:12 default priority these bits specify the default priority that is used when a tag is inserted or changed on egress. r/w 000b 11:0 default vlan id these bits specify the default that is used when a tag is inserted or changed on egress. r/w 001h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 342 smsc lan9303/lan9303i datasheet 13.4.4.21 buffer manager port 1 default vlan id and priority register (bm_vlan_1) this register is used to specify the default vlan id and priority of port 1. register #: 1c14h size: 32 bits bits description type default 31:15 reserved ro - 14:12 default priority these bits specify the default priority that is used when a tag is inserted or changed on egress. r/w 000b 11:0 default vlan id these bits specify the default that is used when a tag is inserted or changed on egress. r/w 001h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 343 revision 1.5 (07-08-11) datasheet 13.4.4.22 buffer manager port 2 default vlan id and priority register (bm_vlan_2) this register is used to specify the default vlan id and priority of port 2. register #: 1c15h size: 32 bits bits description type default 31:15 reserved ro - 14:12 default priority these bits specify the default priority that is used when a tag is inserted or changed on egress. r/w 000b 11:0 default vlan id these bits specify the default that is used when a tag is inserted or changed on egress. r/w 001h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 344 smsc lan9303/lan9303i datasheet 13.4.4.23 buffer manager port 0 ingress rate drop count register (bm_rate_drp_cnt_src_0) this register counts the number of packets received on port 0 that were dropped by the buffer manager due to ingress rate limit discarding (red and random yellow dropping). register #: 1c16h size: 32 bits bits description type default 31:0 dropped count these bits count the number of dropped packets received on port 0 and is cleared when read. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 345 revision 1.5 (07-08-11) datasheet 13.4.4.24 buffer manager port 1 ingress rate drop count register (bm_rate_drp_cnt_src_1) this register counts the number of packets received on port 1 that were dropped by the buffer manager due to ingress rate limit discarding (red and random yellow dropping). register #: 1c17h size: 32 bits bits description type default 31:0 dropped count these bits count the number of dropped packets received on port 1 and is cleared when read. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 346 smsc lan9303/lan9303i datasheet 13.4.4.25 buffer manager port 2 ingress rate drop count register (bm_rate_drp_cnt_src_2) this register counts the number of packets received on port 2 that were dropped by the buffer manager due to ingress rate limit discarding (red and random yellow dropping). register #: 1c18h size: 32 bits bits description type default 31:0 dropped count these bits count the number of dropped packets received on port 2 and is cleared when read. note: this counter will stop at its maximum value of ffff_ffffh. minimum rollover time at 100mbps is approximately 481 hours. rc 00000000h downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 347 revision 1.5 (07-08-11) datasheet 13.4.4.26 buffer manager interrupt mask register (bm_imr) this register contains the buffer manager inte rrupt mask, which masks the interrupts in the buffer manager interrupt pending register (bm_ipr) . all buffer manager interrupts are masked by setting the interrupt mask bit. clearing this bit will unmask the interrupts. refer to chapter 5, "system interrupts," on page 55 for more information. register #: 1c20h size: 32 bits bits description type default 31:1 reserved ro - 0 interrupt mask when set, this bit masks interrupts from the buffer manager. the status bits in the buffer manager interrupt pending register (bm_ipr) are not affected. r/w 1b downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 348 smsc lan9303/lan9303i datasheet 13.4.4.27 buffer manager interrupt pending register (bm_ipr) this register contains the buffer manager interrupt status. the status is double buffered. all interrupts in this register may be masked via the buffer manager interrupt mask register (bm_imr) register. refer to chapter 5, "system interrupts," on page 55 for more information. register #: 1c21h size: 32 bits bits description type default 31:14 reserved ro - 13:10 drop reason b when the status b pending bit is set, these bits indicate the reason a packet was dropped per the table below: rc 0h 9:8 source port b when the status b pending bit is set, these bits indicate the source port on which the packet was dropped. 00 = port 0 01 = port 1 10 = port 2 11 = reserved rc 00b 7 status b pending when set, bits 13:8 are valid. rc 0b bit values description 0000 the destination address was not in the alr table (unknown or broadcast), and the broadcast buffer level was exceeded. 0001 drop on red was set and the packet was colored red. 0010 there were no buffers available. 0011 there were no memory descriptors available. 0100 the destination address was not in the alr table (unknown or broadcast) and there were no valid destination ports. 0101 the packet had a receive error and was >64 bytes. 0110 the buffer drop level was exceeded. 0111 reserved 1000 reserved 1001 drop on yellow was set, the packet was colored yellow and was randomly selected to be dropped. 1010 reserved 1011 reserved 1100 reserved 1101 reserved 1110 reserved 1111 reserved downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 349 revision 1.5 (07-08-11) datasheet 6:3 drop reason a when the set a valid bit is set, these bits indicate the reason a packet was dropped. see the drop reason b description above for definitions of each value of this field. rc 0h 2:1 source port a when the set a valid bit is set, these bits indicate the source port on which the packet was dropped. 00 = port 0 01 = port 1 10 = port 2 11 = reserved rc 00b 0 set a valid when set, bits 6:1 are valid. rc 0b bits description type default downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 350 smsc lan9303/lan9303i datasheet chapter 14 operational characteristics 14.1 absolute maximum ratings* supply voltage (vdd33a1, vdd33a2, vdd33bias, vdd33io) ( note 14.1 ) . . . . . . . . . . . 0v to +3.6v positive voltage on signal pins, with respect to ground ( note 14.2 ) . . . . . . . . . . . . . . . . . . . . . . . . . +6v negative voltage on signal pins, with respect to ground ( note 14.3 ) . . . . . . . . . . . . . . . . . . . . . . . -0.5v positive voltage on xi, with respect to ground. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + 4.6v positive voltage on xo, with respect to ground. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . +2. 5v ambient operating temperature in still air (t a ). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . note 14.4 storage temperature. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .-55 o c to +150 o c lead temperature range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . refer to jedec spec . j-std-020 hbm esd performance per jesd 22-a114-e. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .+/- 8kv contact discharge esd performance per iec61000-4-2 ( note 14.5 ). . . . . . . . . . . . . . . . . . . . ..+/- 8kv air-gap discharge esd performance per iec61000-4-2 ( note 14.5 ). . . . . . . . . . . . . . . . . . . ..+/- 15kv latch-up performance per eia/jesd 78 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .+/- 200ma note 14.1 when powering this device from laboratory or system power supplies, it is important that the absolute maximum ratings not be exceeded or device failure can result. some power supplies exhibit voltage spikes on their outputs when ac power is switched on or off. in addition, voltage transients on the ac power line may appear on the dc output. if this possibility exists, it is suggeste d that a clamp circuit be used. note 14.2 this rating does not apply to the following pins: xi, xo, exres. note 14.3 this rating does not apply to the following pins: exres. note 14.4 0 o c to +70 o c for commercial version, -40 o c to +85 o c for industrial version. note 14.5 performed by independant 3rd party test facility. *stresses exceeding those listed in this section could cause permanent damage to the device. this is a stress rating only. exposure to absolute maximum rating conditions for extended periods may affect device reliability. functional operation of the device at any condition exceeding those indicated in section 14.2, "operating conditions**" , section 14.4, "dc specifications" , or any other applicable section of this specification is not implied. note, device signals are not 5 volt tolerant. 14.2 operating conditions** supply voltage (vdd33a1, vdd33a2, vdd33bias, vdd3 3io). . . . . . . . . . . . . . . . . +3.3v +/- 300mv ambient operating temperature in still air (t a ). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . note 14.4 **proper operation of the device is guaranteed only within the ranges specified in this section. downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 351 revision 1.5 (07-08-11) datasheet 14.3 power consumption this section details the devices typical suppl y current for 10base-t, 100base-tx and power management modes of operation. note: the typical supply current value was measured with 100% network loading. each port's transformer uses an additional 104ma @ 3.3v note: the typical supply current value was measured with 100% network loading. each port's transformer uses an additional 42ma @ 3.3v note: power dissipation is determined by operating frequency, temperature, and supply voltage, as well as external source/sink current requirements. table 14.1 supply and current (10base-t full-duplex) parameter typical unit supply current @ 3.3v (vdd33a1, vdd33a2, vdd33bias, vdd33io) 111 ma ambient operating temperature in still air (t a )2 4 o c table 14.2 supply and current (100base-tx full-duplex) parameter typical unit supply current @ 3.3v (vdd33a1, vdd33a2, vdd33bias, vdd33io) 190 ma ambient operating temperature in still air (t a )2 4 o c table 14.3 supply and current (power management) parameter typical unit both internal phys in energy detect power down @ 3.3v 74 ma both internal phys in ge neral power down @ 3.3v 44 ma ambient operating temperature in still air (t a )2 4 o c downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 352 smsc lan9303/lan9303i datasheet 14.4 dc specifications note 14.6 this specification applies to all is type inputs and tri-stated bi-directional pins. internal pull- down and pull-up resistors add +/- 50ua per-pin (typical). note 14.7 xi can optionally be driven from a 25mhz single-ended clock oscillator. table 14.4 i/o buffer characteristics parameter symbol min typ max units notes is type input buffer low input level high input level negative-going threshold positive-going threshold schmitttrigger hysteresis (v iht - v ilt ) input leakage input capacitance v ili v ihi v ilt v iht v hys i in c in -0.3 1.01 1.39 345 -10 1.18 1.6 420 3.6 1.35 1.8 485 10 3 vv v v mv ua pf schmitt trigger schmitt trigger note 14.6 o8 type buffers low output level high output level v ol v oh vdd33io - 0.4 0.4 v v i ol = 8ma i oh = -8ma od8 type buffer low output level v ol 0.4 v i ol = 8ma o12 type buffer low output level high output level v ol v oh vdd33io - 0.4 0.4 v v i ol = 12ma i oh = -12ma od12 type buffer low output level v ol 0.4 v i ol = 12ma os12 high output level v oh vdd33io - 0.4 vi oh = -12ma o16 type buffer low output level high output level v ol v oh vdd33io - 0.6 0.4 v v i ol = 16ma i oh = -16ma iclk type buffer (xi input) low input level high input level v ili v ihi -0.3 1.4 0.5 3.6 vv note 14.7 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 353 revision 1.5 (07-08-11) datasheet note 14.8 measured at line side of transformer, line replaced by 100 (+/- 1%) resistor. note 14.9 offset from 16ns pulse width at 50% of pulse peak. note 14.10 measured differentially. note 14.11 min/max voltages guaranteed as measured with 100 resistive load. table 14.5 100base-tx transceiver characteristics parameter symbol min typ max units notes peak differential output voltage high v pph 950 - 1050 mvpk note 14.8 peak differential output voltage low v ppl -950 - -1050 mvpk note 14.8 signal amplitude symmetry v ss 98 - 102 % note 14.8 signal rise and fall time t rf 3.0 - 5.0 ns note 14.8 rise and fall symmetry t rfs --0 . 5n s note 14.8 duty cycle distortion d cd 35 50 65 % note 14.9 overshoot and undershoot v os --5% jitter 1.4 ns note 14.10 table 14.6 10base-t transceiver characteristics parameter symbol min typ max units notes transmitter peak differential output voltage v out 2.2 2.5 2.8 v note 14.11 receiver differential squelch threshold v ds 300 420 585 mv downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 354 smsc lan9303/lan9303i datasheet 14.5 ac specifications this section details the various ac timing specifications of the device. note: the i 2 c timing adheres to the nxp i 2 c-bus specification . refer to the nxp i 2 c-bus specification for detailed i 2 c timing information. note: the mii/smi timing adheres to the ieee 802.3 specification. note: the rmii timing adheres to the rmii consortium rmii specification r1.2. 14.5.1 equivalent test load output timing specifications assume the 25pf eq uivalent test load, unless otherwise noted, as illustrated in figure 14.1 below. figure 14.1 output equivalent test load 25 pf output downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 355 revision 1.5 (07-08-11) datasheet 14.5.2 reset and configuration strap timing this diagram illustrates the nrst pin timing requirem ents and its relation to the configuration strap pins and output drive. assertion of nrst is not a requirement. however, if used, it must be asserted for the minimum period specified. please refer to section 4.2, "resets," on page 42 for additional information. note: device configuration straps are latched as a result of nrst assertion. refer to section 4.2.4, "configuration straps," on page 46 for details. figure 14.2 nrst reset pin timing table 14.7 nrst reset pin timing values symbol description min typ max units t rstia nrst input assertion time 200 s t css configuration strap pins setup to nrst deassertion 200 ns t csh configuration strap pins hold after nrst deassertion 10 ns t odad output drive after deassertion 30 ns t css nrst configuration strap pins t rstia t csh output drive t odad downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 356 smsc lan9303/lan9303i datasheet 14.5.3 power-on configurat ion strap valid timing this diagram illustrates the configuration strap valid timing requirements in relation to power-on. in order for valid configuration strap values to be read at power-on, the followi ng timing requirements must be met. note: configuration straps must only be pulled high or low. configuration straps must not be driven as inputs. note: device configuration straps are also latched as a result of nrst assertion. refer to section 14.5.2, "reset and configuration strap timing," on page 355 and section 4.2.4, "configuration straps," on page 46 for additional details. figure 14.3 power-on configuration strap latching timing table 14.8 power-on configuration strap latching timing values symbol description min typ max units t cfg configuration strap valid time 15 ms vdd33io configuration straps t cfg 2.0v downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 357 revision 1.5 (07-08-11) datasheet 14.5.4 mii interface timing (mac mode) this section specifies the mii interface input and output timing when in mac mode. please refer to chapter 9, "mii data interface," on page 123 for additional details. note 14.12 timing was designed for system load between 10pf and 25 pf. figure 14.4 mii output timing (mac mode) table 14.9 mii output ti ming values (mac mode) symbol description min max units notes t clkp p0_outclk period 40 ns t clkh p0_outclk high time t clkp *0.4 t clkp *0.6 ns t clkl p0_outclk low time t clkp *0.4 t clkp *0.6 ns t val p0_outd[3:0], p0_outdv output valid from rising edge of p0_outclk 22.0 ns note 14.12 t hold p0_outd[3:0], p0_outdv output hold from rising edge of p0_outclk 0n s note 14.12 p0_outclk p0_outd[3:0] p0_outdv t clkh t clkl t clkp t val t hold (input) t val t val t hold downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 358 smsc lan9303/lan9303i datasheet note 14.13 timing was designed for system load between 10pf and 25 pf. figure 14.5 mii inpu t timing (mac mode) table 14.10 mii input ti ming values (mac mode) symbol description min max units notes t clkp p0_inclk period 40 ns t clkh p0_inclk high time t clkp *0.4 t clkp *0.6 ns t clkl p0_inclk low time t clkp *0.4 t clkp *0.6 ns t su p0_ind[3:0], p0_indv setup time to rising edge of p0_inclk 8.0 ns note 14.13 t hold p0_ind[3:0], p0_indv hold time after rising edge of p0_inclk 9.0 ns note 14.13 p0_inclk t su p0_ind[3:0] p0_indv t clkh t clkl t clkp t hold t su t hold t hold t su (input) t hold downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 359 revision 1.5 (07-08-11) datasheet 14.5.5 mii interface timing (phy mode) this section specifies the mii interface input and output timing when in phy mode. please refer to chapter 9, "mii data interface," on page 123 for additional details. note 14.14 timing was designed for system load between 10 pf and 25 pf. figure 14.6 mii output timing (phy mode) table 14.11 mii output ti ming values (phy mode) symbol description min max units notes t clkp p0_outclk period 40 ns t clkh p0_outclk high time t clkp *0.4 t clkp *0.6 ns t clkl p0_outclk low time t clkp *0.4 t clkp *0.6 ns t val p0_outd[3:0], p0_outdv output valid from rising edge of p0_outclk 28.0 ns note 14.14 t hold p0_outd[3:0], p0_outdv output hold from rising edge of p0_outclk 10.0 ns note 14.14 p0_outclk p0_outd[3:0] p0_outdv t clkh t clkl t clkp t val t hold (output) t val t val t hold downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 360 smsc lan9303/lan9303i datasheet note 14.15 timing was designed for system load between 10 pf and 25 pf. figure 14.7 mii input timing (phy mode) table 14.12 mii input timing values (phy mode) symbol description min max units notes t clkp p0_inclk period 40 ns t clkh p0_inclk high time t clkp *0.4 t clkp *0.6 ns t clkl p0_inclk low time t clkp *0.4 t clkp *0.6 ns t su p0_ind[3:0], p0_indv setup time to rising edge of p0_inclk 9.0 ns note 14.15 t hold p0_ind[3:0], p0_indv hold time after rising edge of p0_inclk 0n s note 14.15 p0_inclk t su p0_ind[3:0] p0_indv t clkh t clkl t clkp t hold t su t hold t hold t su (output) t hold downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 361 revision 1.5 (07-08-11) datasheet 14.5.6 turbo mii interface timing (mac mode) this section specifies the turbo mii interface input and output timing when in mac mode. please refer to chapter 9, "mii data interface," on page 123 for additional details. note 14.16 timing was designed for system load between 10pf and 15 pf. figure 14.8 turbo mii output timing (mac mode) table 14.13 turbo mii output timing values (mac mode) symbol description min max units notes t clkp p0_outclk period 20 ns t clkh p0_outclk high time t clkp *0.4 t clkp *0.6 ns t clkl p0_outclk low time t clkp *0.4 t clkp *0.6 ns t val p0_outd[3:0], p0_outdv output valid from rising edge of p0_outclk 11.0 ns note 14.16 t hold p0_outd[3:0], p0_outdv output hold from rising edge of p0_outclk 2.0 ns note 14.16 p0_outclk p0_outd[3:0] p0_outdv t clkh t clkl t clkp t val t hold (input) t val t val t hold downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 362 smsc lan9303/lan9303i datasheet note 14.17 timing was designed for system load between 10pf and 15 pf. figure 14.9 turbo mii input timing (mac mode) table 14.14 turbo mii input ti ming values (mac mode) symbol description min max units notes t clkp p0_inclk period 20 ns t clkh p0_inclk high time t clkp *0.4 t clkp *0.6 ns t clkl p0_inclk low time t clkp *0.4 t clkp *0.6 ns t su p0_ind[3:0], p0_indv setup time to rising edge of p0_inclk 4.0 ns note 14.17 t hold p0_ind[3:0], p0_indv hold time after rising edge of p0_inclk 0n s note 14.17 p0_inclk t su p0_ind[3:0] p0_indv t clkh t clkl t clkp t hold t su t hold t hold t su (input) t hold downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 363 revision 1.5 (07-08-11) datasheet 14.5.7 turbo mii interface timing (phy mode) this section specifies the turbo mii interface input and output timing when in phy mode. please refer to chapter 9, "mii data interface," on page 123 for additional details. note 14.18 timing was designed for system load between 10 pf and 15 pf. figure 14.10 turbo mii outp ut timing (phy mode) table 14.15 turbo mii output timing values (phy mode) symbol description min max units notes t clkp p0_outclk period 20 ns t clkh p0_outclk high time t clkp *0.4 t clkp *0.6 ns t clkl p0_outclk low time t clkp *0.4 t clkp *0.6 ns t val p0_outd[3:0], p0_outdv output valid from rising edge of p0_outclk 14.0 ns note 14.18 t hold p0_outd[3:0], p0_outdv output hold from rising edge of p0_outclk 2.0 ns note 14.18 p0_outclk p0_outd[3:0] p0_outdv t clkh t clkl t clkp t val t hold (output) t val t val t hold downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 364 smsc lan9303/lan9303i datasheet note 14.19 timing was designed for system load between 10 pf and 15 pf. figure 14.11 turbo mii input timing (phy mode) table 14.16 turbo mii input timing values (phy mode) symbol description min max units notes t clkp p0_inclk period 20 ns t clkh p0_inclk high time t clkp *0.4 t clkp *0.6 ns t clkl p0_inclk low time t clkp *0.4 t clkp *0.6 ns t su p0_ind[3:0], p0_indv setup time to rising edge of p0_inclk 7.0 ns note 14.19 t hold p0_ind[3:0], p0_indv hold time after rising edge of p0_inclk 0n s note 14.19 p0_inclk t su p0_ind[3:0] p0_indv t clkh t clkl t clkp t hold t su t hold t hold t su (output) t hold downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 365 revision 1.5 (07-08-11) datasheet 14.5.8 rmii interface timing this section specifies the rmii interface timing for p0_outclk input and output modes. please refer to chapter 9, "mii data interface," on page 123 for additional details. note 14.20 timing was designed for system load between 10 pf and 25 pf. figure 14.12 rmii p0_outclk output mode timing table 14.17 rmii p0_outclk ou tput mode timing values symbol description min max units notes t clkp p0_outclk period 20 ns t clkh p0_outclk high time t clkp *0.4 t clkp *0.6 ns t clkl p0_outclk low time t clkp *0.4 t clkp *0.6 ns t val p0_outd[1:0], p0_outdv output valid from rising edge of p0_outclk 14.0 ns note 14.20 t ohold p0_outd[1:0], p0_outdv output hold from rising edge of p0_outclk 2.0 ns note 14.20 t su p0_ind[1:0], p0_indv setup time to rising edge of p0_inclk 4.0 ns note 14.20 t ihold p0_ind[1:0], p0_indv input hold time after rising edge of p0_inclk 1.5 ns note 14.20 p0_outclk p0_outd[1:0] p0_outdv t clkh t clkl t clkp t val t ohold (output) t val t val t ohold t su p0_ind[1:0] p0_indv t ihold t su t ihold t ihold t su t ihold downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 366 smsc lan9303/lan9303i datasheet note 14.21 timing was designed for system load between 10 pf and 25 pf. figure 14.13 rmii p0_out clk input mode timing table 14.18 rmii p0_outclk input mode timing values symbol description min max units notes t clkp p0_outclk period 20 ns t clkh p0_outclk high time t clkp *0.35 t clkp *0.65 ns t clkl p0_outclk low time t clkp *0.35 t clkp *0.65 ns t oval p0_outd[1:0], p0_outdv output valid from rising edge of p0_outclk 14.0 ns note 14.21 t ohold p0_outd[1:0], p0_outdv output hold from rising edge of p0_outclk 3.0 ns note 14.21 t su p0_ind[1:0], p0_indv setup time to rising edge of p0_inclk 4.0 ns note 14.21 t ihold p0_ind[1:0], p0_indv input hold time after rising edge of p0_inclk 1.5 ns note 14.21 p0_outclk p0_outd[1:0] p0_outdv t clkh t clkl t clkp t val t ohold (input) t val t val t ohold t su p0_ind[1:0] p0_indv t ihold t su t ihold t ihold t su t ihold downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 367 revision 1.5 (07-08-11) datasheet 14.5.9 smi timing this section specifies the smi timing of the device in both master and slave modes. please refer to chapter 9, "mii data interface," on page 123 for additional details. figure 14.14 smi timing table 14.19 smi timing values symbol description min max units notes t clkp mdc period 400 ns t clkh mdc high time (slave mode - clock is input) 160 (80%) ns mdc high time (master mode - clock is output) 180 (90%) ns t clkl mdc low time (slave mode - clock is input) 160 (80%) ns mdc low time (master mode - clock is output) 180 (90%) ns t val mdio (slave mode - read from phy) output valid from rising edge of mdc 300 ns mdio (master mode - write to phy) output valid from rising edge of mdc 250 ns t ohold mdio (slave mode - read from phy) output hold from rising edge of mdc 10 ns mdio (master mode - write to phy) output hold from rising edge of mdc 50 ns t su mdio (slave mode - write to phy) setup time to rising edge of mdc 10 ns mdio (master mode - read from phy) setup time to rising edge of mdc 70 ns mdc mdio t clkh t clkl t clkp t ohold mdio t su t ihold (data-out) (data-in) t ohold t val downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 368 smsc lan9303/lan9303i datasheet t ihold mdio (slave mode - write to phy) input hold time after rising edge of mdc 5n s mdio (master mode - read from phy) input hold time after rising edge of mdc 0n s table 14.19 smi timing values symbol description min max units notes downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 369 revision 1.5 (07-08-11) datasheet 14.6 clock circuit the device can accept either a 25mhz crystal (prefe rred) or a 25mhz single-ended clock oscillator (+/- 50ppm) input. if the single-ended clock oscillator method is implemented, xo should be left unconnected and xi should be driven with a nominal 0-3.3v clock signal. the input clock duty cycle is 40% minimum, 50% typical and 60% maximum. it is recommended that a crystal utilizing matchi ng parallel load capacitors be used for the crystal input/output signals (xi/xo). see table 14.20 for crystal specifications. note 14.22 the maximum allowable values for frequency tolerance and frequency stability are application dependant. since any particular application must meet the ieee +/-50 ppm total ppm budget, the combination of these two values must be approximately +/-45 ppm (allowing for aging). note 14.23 frequency deviation over time is also referred to as aging. note 14.24 the total deviation for the transmitter clock frequency is specified by ieee 802.3 as +/- 50 ppm. note 14.25 0 o c for commercial version, -40 o c for industrial version. note 14.26 +70 o c for commercial version, +85 o c for industrial version. note 14.27 this number includes the pad, the bond wire and the lead frame. pcb capacitance is not included in this value. the xo/xi pin and pcb capacitance values are required to accurately calculate the value of the two external load capacitors. these two external load capacitors determine the accuracy of the 25.000 mhz frequency. table 14.20 crystal specifications parameter symbol min nom max units notes crystal cut at, typ crystal oscillation mode fundamental mode crystal calibration mode parallel resonant mode frequency f fund - 25.000 - mhz frequency tolerance @ 25 o cf tol --+ / - 5 0 p p m note 14.22 frequency stability over temp f temp --+ / - 5 0 p p m note 14.22 frequency deviation over time f age - +/-3 to 5 - ppm note 14.23 total allowable ppm budget - - +/-50 ppm note 14.24 shunt capacitance c o -7 t y p-p f load capacitance c l - 20 typ - pf drive level p w 300 - - uw equivalent series resistance r 1 --3 0 o h m operating temperature range note 14.25 - note 14.26 o c xi pin capacitance - 3 typ - pf note 14.27 xo pin capacitance - 3 typ - pf note 14.27 downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 370 smsc lan9303/lan9303i datasheet chapter 15 package outline 15.1 56-qfn pa ckage outline notes: 1. all dimensions are in milli meters unless otherwise noted. 2. position tolerance of each terminal and exposed pad is +/- 0.05mm at maximum material condition. dimension b applies to plated terminals and is measured between 0.15 and 0.30mm from the terminal tip. 3. the pin 1 identifier may vary, but is always located within the zone indicated. figure 15.1 56-qfn package definition table 15.1 56-qfn dimensions min nominal max remarks a 0.70 - 1.00 overall package height a1 0 0.02 0.05 standoff a2 - - 0.90 mold cap thickness d/e 7.85 8.00 8.15 x/y body size d1/e1 7.55 - 7.95 x/y mold cap size d2/e2 5.75 5.90 6.05 x/y exposed pad size l 0.30 - 0.50 terminal length b 0.18 0.25 0.30 terminal width e 0.50 bsc terminal pitch downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet smsc lan9303/lan9303i 371 revision 1.5 (07-08-11) datasheet figure 15.2 56-qfn recommended pcb land pattern downloaded from: http:///
small form factor three port 10/100 managed ethernet switch with single mii/rmii/turbo mii datasheet revision 1.5 (07-08-11) 372 smsc lan9303/lan9303i datasheet chapter 16 datasheet revision history table 16.1 customer revision history revision level & date secti on/figure/entry correction rev. 1.5 (07-08-11) table 14.19, smi timing values, on page 367 changed t val to 300 from 200 for slave mode. table 4.3, hard-strap configuration strap definitions, on page 52 added notes to the p0_rmii_clock_dir_strap: the value of this strap is the inverse of the p 0 _mode1 pin. rev. 1.4 (07-07-10) table 3.6, serial management/eeprom pins, on page 38 added note to ee_sda/sda and ee_scl/scl pin descriptions stating this pin must be pulled-up by an external resistor at all times. section 13.4.2.23, "port x mac transmit configuration register (mac_tx_cfg_x)," on page 252 added note to ifg config bit: ifg config values less than 15 are unsupported. section 13.4.3.10, "switch engine vlan read data register (swe_vlan_rd_data)," on page 286 updated field descriptions for port default vid and prioroty, bits 16 and 11:0 to match those of the swe_vlan_wr_data register. table 7.2, 4b/5b code table, on page 93 corrected typo in 10001 code group receiver interpretation. j changed to /j/. section 1.1, "general terms," on page 13 added 10base-t and 100base-tx definitions to general terms list, replacing 100bt. table 6.1, switch fabric flow control enable logic, on page 64 corrected typo in last column title. rx flow control enable changed to tx flow control enable section 13.2.6.4, "virtual phy identification lsb register (vphy_id_lsb)," on page 178 , section 13.3.2.4, "port x phy identification lsb register (phy_id_lsb_x)," on page 201 clarified default values using binary. figure 14.2 nrst reset pin timing on page 355 updated diagram with correct shading. rev. 1.3 (08-27-09) section 14.5, "ac specifications," on page 354 added mii, rmii, and smi timing diagrams and specifications. section 14.1, "absolute maximum ratings*," on page 350 and cover added esd rating information section 14.3, "power consumption," on page 351 added power consumption information rev. 1.2 (12-19-08) initial release downloaded from: http:///


▲Up To Search▲   

 
Price & Availability of LAN9303MI-AKZE

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X